From: Marek Polacek Date: Thu, 20 Jun 2019 15:37:35 +0000 (+0000) Subject: re PR c++/87512 (Error: the type ‘const auto’ of ‘constexpr’ variable is not literal) X-Git-Tag: misc/cutover-git~4671 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7772dbe2fad60d8be78b81e0fdce23aff1344be5;p=thirdparty%2Fgcc.git re PR c++/87512 (Error: the type ‘const auto’ of ‘constexpr’ variable is not literal) PR c++/87512 * g++.dg/cpp1z/inline-var7.C: New test. From-SVN: r272512 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0fd1ce07210d..2d741d8df460 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-06-20 Marek Polacek + + PR c++/87512 + * g++.dg/cpp1z/inline-var7.C: New test. + 2019-06-20 H.J. Lu PR target/54855 diff --git a/gcc/testsuite/g++.dg/cpp1z/inline-var7.C b/gcc/testsuite/g++.dg/cpp1z/inline-var7.C new file mode 100644 index 000000000000..71fa1d3b7da6 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/inline-var7.C @@ -0,0 +1,20 @@ +// PR c++/87512 +// { dg-do compile { target c++17 } } + +template using enable_if_t = int; +template struct is_pointer { enum { value = 0 }; }; + +template +inline constexpr auto IsPtr = is_pointer::value; + +class Foo; +class Bar; + +template +void foo(T1, T2); + +template +enable_if_t> foo(T, Foo); + +template <> +void foo(Bar, Bar);