Features: Adjust cxx_variadic_templates unit test for GNU < 4.7.
The unit test for this fails with GNU 4.6: Building CXX object CMakeFiles/test_cxx_variadic_templates.dir/cxx_variadic_templates.cpp.o CompileFeatures/cxx_variadic_templates.cpp: In static member function ‘static int Interface<I, Is>::accumulate()’: CompileFeatures/cxx_variadic_templates.cpp:18:31: sorry, unimplemented: cannot expand ‘Is ...’ into a fixed-length argument list CMakeFiles/test_cxx_variadic_templates.dir/build.make:54: recipe for target 'CMakeFiles/test_cxx_variadic_templates.dir/cxx_variadic_templates.cpp.o' failed The workaround is to use a specialization: http://stackoverflow.com/questions/1989552 http://stackoverflow.com/questions/11297376
This commit is contained in:
parent
0798d1e5b0
commit
1f19ac4da5
|
@ -1,4 +1,4 @@
|
||||||
template<int I, int... Is>
|
template<int... Is>
|
||||||
struct Interface;
|
struct Interface;
|
||||||
|
|
||||||
template<int I>
|
template<int I>
|
||||||
|
@ -11,7 +11,7 @@ struct Interface<I>
|
||||||
};
|
};
|
||||||
|
|
||||||
template<int I, int... Is>
|
template<int I, int... Is>
|
||||||
struct Interface
|
struct Interface<I, Is...>
|
||||||
{
|
{
|
||||||
static int accumulate()
|
static int accumulate()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue