From a4db0c780e289327bde0de7b140bde3d920e0845 Mon Sep 17 00:00:00 2001 From: guwirth Date: Thu, 24 Aug 2017 15:34:39 +0200 Subject: [PATCH] C++17 non-type template parameters with auto - add only a test (grammar is working) - close #1141 --- .../C++17/non-type-template-parameters-auto.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 cxx-squid/src/test/resources/parser/own/C++17/non-type-template-parameters-auto.cc diff --git a/cxx-squid/src/test/resources/parser/own/C++17/non-type-template-parameters-auto.cc b/cxx-squid/src/test/resources/parser/own/C++17/non-type-template-parameters-auto.cc new file mode 100644 index 0000000000..85f7456930 --- /dev/null +++ b/cxx-squid/src/test/resources/parser/own/C++17/non-type-template-parameters-auto.cc @@ -0,0 +1,17 @@ +template struct B { /* ... */ }; +B<5> b1; // OK: template parameter type is int +B<'a'> b2; // OK: template parameter type is char + +template class Y { }; +template class Y

{ }; +template class Y { }; + +template void g(Y); +template void g(Y); + +template constexpr auto TConstant = value; +constexpr auto const MySuperConst = TConstant <100>; + +// example of heterogeneous compile time list +template struct HeterogenousValueList {}; +using MyList = HeterogenousValueList<'a', 100, 'b'>;