diff --git a/Tests/CompileFeatures/cxx_variadic_templates.cpp b/Tests/CompileFeatures/cxx_variadic_templates.cpp index a80e157e6..e1f641b81 100644 --- a/Tests/CompileFeatures/cxx_variadic_templates.cpp +++ b/Tests/CompileFeatures/cxx_variadic_templates.cpp @@ -1,5 +1,23 @@ +#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) < 407) +#define OLD_GNU +#endif + +#ifdef OLD_GNU template struct Interface; +#endif + +template +struct Interface +#ifdef OLD_GNU + +#endif +{ + static int accumulate() + { + return I + Interface::accumulate(); + } +}; template struct Interface @@ -10,15 +28,6 @@ struct Interface } }; -template -struct Interface -{ - static int accumulate() - { - return I + Interface::accumulate(); - } -}; - // Note: split this into a separate test if a // cxx_variadic_template_template_parameters feature is added.