[gcc r17-145] libstdc++: Expand tests for std::type_order.
Tomasz Kaminski
tkaminsk@gcc.gnu.org
Tue Apr 28 12:39:22 GMT 2026
https://gcc.gnu.org/g:47480a30d08fef394b3e12f36b9fa1f77a7add74
commit r17-145-g47480a30d08fef394b3e12f36b9fa1f77a7add74
Author: Tomasz Kamiński <tkaminsk@redhat.com>
Date: Wed Apr 22 12:30:19 2026 +0200
libstdc++: Expand tests for std::type_order.
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>
Diff:
---
gcc/testsuite/g++.dg/cpp26/type-order1.C | 21 +++++++++++++++++++++
.../18_support/comparisons/type_order/1.cc | 21 +++++++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/gcc/testsuite/g++.dg/cpp26/type-order1.C b/gcc/testsuite/g++.dg/cpp26/type-order1.C
index d5693570a47d..bc7e87644a9a 100644
--- a/gcc/testsuite/g++.dg/cpp26/type-order1.C
+++ b/gcc/testsuite/g++.dg/cpp26/type-order1.C
@@ -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;
diff --git a/libstdc++-v3/testsuite/18_support/comparisons/type_order/1.cc b/libstdc++-v3/testsuite/18_support/comparisons/type_order/1.cc
index 63864fa98b45..7c428a93f967 100644
--- a/libstdc++-v3/testsuite/18_support/comparisons/type_order/1.cc
+++ b/libstdc++-v3/testsuite/18_support/comparisons/type_order/1.cc
@@ -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;
More information about the Libstdc++-cvs
mailing list