This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/46778] More SFINAE issues?
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 3 Dec 2010 11:32:07 +0000
- Subject: [Bug c++/46778] More SFINAE issues?
- Auto-submitted: auto-generated
- References: <bug-46778-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46778
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-12-03 11:32:00 UTC ---
the test looks valid to me, this simpler version is also rejected
template<typename _Tp>
class is_constructible_mini2
{
typedef char __one;
typedef struct { char __arr[2]; } __two;
template<typename _Tp1>
static decltype(_Tp1(), __one())
__test(int);
template<typename>
static __two __test(...);
public:
static const bool value = sizeof(__test<_Tp>(0)) == 1;
};
int t1[is_constructible_mini2<int&>::value ? -1 : 1];
int t2[is_constructible_mini2<const int&>::value ? -1 : 1];