【发布时间】:2014-07-27 13:27:55
【问题描述】:
我正在尝试编译以下代码:
#include <iostream>
template<template <typename...> class Container,class... Args>
struct Container
{};
template<class T1,class T2>
struct Store
{};
int main()
{
Container<Store,int,double> a;
}
//g++ -Wall -std=c++11 main.cpp
我使用的是 gcc 4.8.1,但出现以下错误:
internal compiler error: Segmentation fault
struct Container
^
为什么 gcc 不编译呢?那个代码正确吗?
【问题讨论】:
标签: c++ templates gcc c++11 variadic-templates