
Boost variant has a constructor and an assignment operator that would take just anything. If it cannot be converted to any of its bounded types, it will result in an error within variant's internals. This, mixed with conversion operators, interferes with overload resolution (code that reproduces the issue attached). Would SFINAE'ing out the non-candidate constructors (and assignments) fix this? Agustín K-ballo Bergé.- http://talesofcpp.blogspot.com

On 09/05/2011 10:34 AM, Agustín K-ballo Bergé wrote:
Boost variant has a constructor and an assignment operator that would take just anything. If it cannot be converted to any of its bounded types, it will result in an error within variant's internals. This, mixed with conversion operators, interferes with overload resolution (code that reproduces the issue attached). Would SFINAE'ing out the non-candidate constructors (and assignments) fix this?
Yes it would. File a bug?

On 05/09/2011 6:29, Mathias Gaunard wrote:
On 09/05/2011 10:34 AM, Agustín K-ballo Bergé wrote:
Boost variant has a constructor and an assignment operator that would take just anything. If it cannot be converted to any of its bounded types, it will result in an error within variant's internals. This, mixed with conversion operators, interferes with overload resolution (code that reproduces the issue attached). Would SFINAE'ing out the non-candidate constructors (and assignments) fix this?
Yes it would. File a bug?
Done, https://svn.boost.org/trac/boost/ticket/5871. Agustín K-ballo Bergé.- http://talesofcpp.blogspot.com
participants (2)
-
Agustín K-ballo Bergé
-
Mathias Gaunard