[Bug c++/49229] [C++0x][SFINAE] ICE with variadics and depending non-type default parameter
daniel.kruegler at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Mon May 30 11:34:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49229
Daniel Krügler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |paolo.carlini at oracle dot
| |com
--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2011-05-30 11:26:28 UTC ---
[Possibly of interest for Paolo as well]
Some observations: Other binary traits that do not lead to a degenerate
specialization as is_same does, do not produce this ICE. E.g. given
template<class, class>
struct is_blubb {
static constexpr bool value = false;
};
template<>
struct is_blubb<bool, bool> {
static constexpr bool value = true;
};
and a constrained c'tor of S like this
template<class... T>
struct S {
template<class... U,
typename enable_if<and_<is_blubb<T, U>...>::value>::type*& = enabler
>
S(U...){}
};
S<bool> s(0);
As expected, this program is rejected as expected, but does not produce an ICE.
More information about the Gcc-bugs
mailing list