From: Marek Polacek Date: Fri, 8 Dec 2023 18:44:10 +0000 (-0500) Subject: c++: Add fixed test [PR88848] X-Git-Tag: basepoints/gcc-15~3795 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a5a5d5e7d32b21205562a35b307ff69e389b996;p=thirdparty%2Fgcc.git c++: Add fixed test [PR88848] This one was fixed by r12-7714-g47da5198766256. PR c++/88848 gcc/testsuite/ChangeLog: * g++.dg/inherit/multiple2.C: New test. --- diff --git a/gcc/testsuite/g++.dg/inherit/multiple2.C b/gcc/testsuite/g++.dg/inherit/multiple2.C new file mode 100644 index 000000000000..dd3d0daf248c --- /dev/null +++ b/gcc/testsuite/g++.dg/inherit/multiple2.C @@ -0,0 +1,35 @@ +// PR c++/88848 +// { dg-do compile { target c++17 } } + +template +struct True { static constexpr bool value{ true }; }; + +template +struct Integer { static constexpr int value{ VALUE }; }; + +template +struct Foo +{ + using Integer_t = Integer; + + static TYPE get_type(Integer_t); +}; + +template +struct Bar : ARGS... +{ + using ARGS::get_type...; + + template + using Type_t = decltype(get_type(Integer{})); + + Bar() { static_assert((True< Type_t >::value && ...)); } + + static_assert((True< Type_t >::value && ...)); +}; + +int main() +{ + Bar, Foo<8, double>> obj; + return int{ sizeof(obj) }; +}