From 536c535cb0cf245a1785d436b0662f7fe59ef1e4 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 16 Jan 2015 19:21:36 +0100 Subject: Features: Adjust cxx_variadic_templates unit test for SolarisStudio. The change in commit 1f19ac4d (Features: Adjust cxx_variadic_templates unit test for GNU < 4.7., 2015-01-11) pacified GNU 4.6, but leaves SolarisStudio 12.4 complaining: "cxx_variadic_templates.cpp", line 5: Error: Partial specialization for Interface has identical arguments. 1 Error(s) detected. Implement a preprocessor test for using the partial specialization workaround needed by GNU 4.6. --- Tests/CompileFeatures/cxx_variadic_templates.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/Tests/CompileFeatures/cxx_variadic_templates.cpp b/Tests/CompileFeatures/cxx_variadic_templates.cpp index a80e157..e1f641b 100644 --- a/Tests/CompileFeatures/cxx_variadic_templates.cpp +++ b/Tests/CompileFeatures/cxx_variadic_templates.cpp @@ -1,21 +1,30 @@ +#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) < 407) +#define OLD_GNU +#endif + +#ifdef OLD_GNU template struct Interface; +#endif -template -struct Interface +template +struct Interface +#ifdef OLD_GNU + +#endif { static int accumulate() { - return I; + return I + Interface::accumulate(); } }; -template -struct Interface +template +struct Interface { static int accumulate() { - return I + Interface::accumulate(); + return I; } }; -- cgit v0.12