|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2004-07-19 20:34:52
Tip for those insane persons who are trying to nurse vc6 along:
Some kinds of SFINAE are possible.
Forming a pointer to a reference, for example, will remove a function
signature from the overload set. Here's something I did in
Boost.Python just now. In this case it was only needed for VC6, but
it should work for any SFINAE-ish compiler:
template <class T>
explicit object(
T const& x
# if BOOST_WORKAROUND(BOOST_MSVC, == 1200)
// use some SFINAE to un-confuse MSVC about its
// copy-initialization ambiguity claim.
, typename mpl::if_<is_proxy<T>,int&,int>::type* = 0
# endif
)
Ron Garcia reminded me that I had done this for the multi_array
library a while ago, and I realized I had forgotten all about it. I
thought y'all should know.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk