[Bug c++/13156] Greedy instantiation
dave at boost-consulting dot com
gcc-bugzilla@gcc.gnu.org
Fri Nov 21 19:13:00 GMT 2003
------- Additional Comments From dave at boost-consulting dot com 2003-11-21 19:13 -------
Well, you're wrong about that, but even if you weren't:
------
struct X
{
template <class T>
X(T const&) { T x = 1; }
};
template <class From, class To>
struct conv1
{
static char (& _m_check(...) )[2];
static char _m_check(To);
static From _m_from;
};
template <class From, class To>
struct conv
{
enum {
value = sizeof( conv1<From,To>::_m_check(conv1<From,To>::_m_from) ) ==
1
};
};
int x[conv<char*,X>::value ? 1 : -1];
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13156
More information about the Gcc-bugs
mailing list