-
Notifications
You must be signed in to change notification settings - Fork 90
Closed
Description
The following snippet triggers an ICE on GCC 7.3.1
using var_t = xtl::variant<int, long, double, std::string>;
std::vector<var_t> vec = { 10, 15l, 1.5, "hello" };
/home/wolfv/Programs/xtl/include/xtl/xvariant_impl.hpp: In substitution of ‘template<long unsigned int I, class ... Ts> using type_pack_element_t = typename mpark::lib::type_pack_element_impl::type::type [with long unsigned int I = I; Ts = {int, long int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >}]’:
/home/wolfv/Programs/xtl/include/xtl/xvariant_impl.hpp:1900:9: required by substitution of ‘template<class Arg, class Decayed, typename std::enable_if<(! std::is_same<Decayed, mpark::variant<int, long int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::value), int>::type <anonymous>, typename std::enable_if<(! mpark::detail::is_in_place_index<Decayed>::value), int>::type <anonymous>, typename std::enable_if<(! mpark::detail::is_in_place_type<Decayed>::value), int>::type <anonymous>, long unsigned int I, class T, typename std::enable_if<std::is_constructible<T, Arg>::value, int>::type <anonymous> > constexpr mpark::variant<int, long int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::variant(Arg&&) [with Arg = mpark::variant<int, long int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >&; Decayed = mpark::variant<int, long int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >; typename std::enable_if<(! std::is_same<Decayed, mpark::variant<int, long int, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::value), int>::type <anonymous> = <missing>; typename std::enable_if<(! mpark::detail::is_in_place_index<Decayed>::value), int>::type <anonymous> = <missing>; typename std::enable_if<(! mpark::detail::is_in_place_type<Decayed>::value), int>::type <anonymous> = <missing>; long unsigned int I = <missing>; T = <missing>; typename std::enable_if<std::is_constructible<T, Arg>::value, int>::type <anonymous> = <missing>]’
/home/wolfv/Programs/xtl/test/main.cpp:57:24: required from here
/home/wolfv/Programs/xtl/include/xtl/xvariant_impl.hpp:1900:9: internal compiler error: unexpected expression ‘I’ of kind template_parm_index
typename T = lib::type_pack_element_t<I, Ts...>,
^~~~~~~~
We should probably also submit this bug as regression to the GCC folks?
ax3l
Metadata
Metadata
Assignees
Labels
No labels