[Bug c++/58353] Internal Compiler Error with Variadic Templates
daniel.kruegler at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Sat Sep 7 16:05:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58353
Daniel Krügler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler@googlemail.
| |com
--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
Removing library dependencies and simplifying a bit (The problem seems not
related to contexpr, for example):
template<class E, E V, int CNT>
struct seq_t
{
template<E... Es> struct seq{};
template<int N, E... Es>
struct gen : gen<N - 1, V, Es...>{};
template<E... Es>
struct gen<0, Es...> : seq<Es...>{};
struct bits_t{ E e[CNT]; };
template<E... Es>
static bits_t init(seq<Es...>) {return {{Es...}};}
static bits_t init() {return init(gen<CNT>{});}
};
typedef seq_t<int, 123, 5> wow;
int main()
{
wow::init();
}
More information about the Gcc-bugs
mailing list