]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Expand tests for std::type_order. master trunk
authorTomasz Kamiński <tkaminsk@redhat.com>
Wed, 22 Apr 2026 10:30:19 +0000 (12:30 +0200)
committerTomasz Kamiński <tkaminsk@redhat.com>
Tue, 28 Apr 2026 12:37:44 +0000 (14:37 +0200)
Expanded test coverage to include:
* array of unknown bounds
* function types and pointers
* data and function member pointers

libstdc++-v3/ChangeLog:

* testsuite/18_support/comparisons/type_order/1.cc: Add tests
for more type.

gcc/testsuite/ChangeLog:

* g++.dg/cpp26/type-order1.C: Add tests for more type.

Reviewed-by: Jakub Jelinek <jakub@redhat.com>
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
gcc/testsuite/g++.dg/cpp26/type-order1.C
libstdc++-v3/testsuite/18_support/comparisons/type_order/1.cc

index d5693570a47df7748f71ca450be39888fc4650fc..bc7e87644a9a7a5e4a6e25e08e7856d053cf2d33 100644 (file)
@@ -92,3 +92,24 @@ constexpr eq <W, W> r;
 constexpr ne <V, W> s;
 constexpr eq <U <W>, U <W>> t;
 constexpr ne <U <V>, U <W>> u;
+
+constexpr eq <int[], int[]> v;
+constexpr ne <int[], int[2]> w;
+constexpr eq <S[], S[]> x;
+constexpr ne <S[], S[2]> y;
+
+constexpr eq <int (), int ()> z;
+constexpr eq <int () noexcept, int () noexcept> aa;
+constexpr ne <int (), int () noexcept> ab;
+constexpr eq <int () const, int () const> ac;
+constexpr ne <int (), int () const> ad;
+constexpr eq <int () &, int () &> ae;
+constexpr ne <int (), int () &> af;
+constexpr eq <int (*)() noexcept, int (*)() noexcept> ag;
+constexpr ne <int (), int (*)()> ah;
+
+constexpr eq <int V::*, int V::*> ba;
+constexpr ne <int V::*, long V::*> bb;
+constexpr eq <int (V::*)() const& noexcept, int (V::*)() const& noexcept> bc;
+constexpr ne <int (V::*)(), long (V::*)()> bd;
+constexpr ne <int (V::*)(), int (*)()> be;
index 63864fa98b45f6fba46e990b7efe9329e0e04de4..7c428a93f967bec11d87889ed3102ebccde1ed3b 100644 (file)
@@ -93,3 +93,24 @@ constexpr eq <W, W> r;
 constexpr ne <V, W> s;
 constexpr eq <U <W>, U <W>> t;
 constexpr ne <U <V>, U <W>> u;
+
+constexpr eq <int[], int[]> v;
+constexpr ne <int[], int[2]> w;
+constexpr eq <S[], S[]> x;
+constexpr ne <S[], S[2]> y;
+
+constexpr eq <int (), int ()> z;
+constexpr eq <int () noexcept, int () noexcept> aa;
+constexpr ne <int (), int () noexcept> ab;
+constexpr eq <int () const, int () const> ac;
+constexpr ne <int (), int () const> ad;
+constexpr eq <int () &, int () &> ae;
+constexpr ne <int (), int () &> af;
+constexpr eq <int (*)() noexcept, int (*)() noexcept> ag;
+constexpr ne <int (), int (*)()> ah;
+
+constexpr eq <int V::*, int V::*> ba;
+constexpr ne <int V::*, long V::*> bb;
+constexpr eq <int (V::*)() const& noexcept, int (V::*)() const& noexcept> bc;
+constexpr ne <int (V::*)(), long (V::*)()> bd;
+constexpr ne <int (V::*)(), int (*)()> be;