こんにちは私は私のコードをclang3.2-9でコンパイルしようとしています、これは私がコンパイルすることができないものの単純化されたサンプルです:
template<template <class>class Derived, typename Type>
class Foo
{
public:
Foo(){}
};
template<typename Type>
class Bar
: public Foo<Bar, Type>
{
public:
Bar()
: Foo<Bar, Type>()
{}
};
int main()
{
Bar<int> toto;
}
そして、これがclangが教えてくれるエラーです:
test.cpp:14:19: error: template argument for template template parameter must be a class template
: Foo<Bar, Type>()
^
test.cpp:14:15: error: expected class member or base class name
: Foo<Bar, Type>()
^
test.cpp:14:15: error: expected '{' or ','
3 errors generated.
gcc4.7.2では問題なくコンパイルされます。そして、clangで動作させるための正しい構文を取得できません。誰かが私を助けてくれますか、私はちょっと立ち往生しています...