https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67161
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-08-09 CC| |trippels at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- trippels@gcc2-power8 ~ % cat neg.ii template <typename _Tp> struct integral_constant { static constexpr _Tp value = 0; }; template <bool, typename, typename> struct conditional; template <typename...> struct __or_; template <typename _B1, typename _B2> struct __or_<_B1, _B2> : conditional<1, _B1, _B2>::type {}; template <typename...> struct __and_; template <typename> struct __not_ : integral_constant<bool> {}; template <typename> struct __is_void_helper : integral_constant<bool> {}; template <typename> struct is_void : __is_void_helper<int> {}; template <bool, typename _Iftrue, typename> struct conditional { typedef _Iftrue type; }; template <bool _Cond, typename _Iftrue, typename _Iffalse> using conditional_t = typename conditional<_Cond, _Iftrue, _Iffalse>::type; template <typename...> using common_type_t = int; template <typename, int> struct array {}; template <typename _Tp> constexpr int is_void_v = is_void<_Tp>::value; template <typename _Dest = void, typename... _Types> constexpr auto make_array() -> array<conditional_t<is_void_v<_Dest>, common_type_t<>, _Dest>, sizeof...(_Types)> { static_assert(__or_<__not_<is_void<_Dest>>, __and_<>>::value, ""); } auto d = make_array(); trippels@gcc2-power8 ~ % /home/trippels/gcc_5/usr/local/bin/g++ -std=c++14 -c neg.ii neg.ii: In instantiation of ‘constexpr array<typename conditional<is_void_v<_Dest>, int, _Dest>::type, sizeof... (_Types)> make_array() [with _Dest = void; _Types = {}; typename conditional<is_void_v<_Dest>, int, _Dest>::type = int]’: neg.ii:26:21: required from here neg.ii:24:3: error: static assertion failed: static_assert(__or_<__not_<is_void<_Dest>>, __and_<>>::value, ""); ^ trippels@gcc2-power8 ~ % g++ -c neg.ii ‘ Segmentation fault static_assert(__or_<__not_<is_void<_Dest>>, __and_<>>::value, ""); ^ 0x10a2f293 crash_signal ...