GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
libstdc++

libstdc++: Expand tests for std::type_order.

Expanded libstdc++ tests for `std::type_order` to include arrays of unknown bounds, function types/pointers, and data/function member pointers.

This commit expands the test coverage for std::type_order in libstdc++. The added tests now include arrays of unknown bounds, function types and pointers, as well as data and function member pointers. This enhanced test suite aims to provide more comprehensive validation of the std::type_order implementation, ensuring its correctness across a wider range of type categories.

In Details

This patch expands the test coverage for std::type_order by adding new tests in testsuite/18_support/comparisons/type_order/1.cc and g++.dg/cpp26/type-order1.C. The added tests cover arrays of unknown bounds, function types and pointers, data and function member pointers.

For Context

std::type_order is a utility in C++ that provides a total ordering for types, primarily used in template metaprogramming and compile-time computations. This commit enhances the robustness of the C++ standard library by adding new test cases for std::type_order. These tests ensure that std::type_order correctly handles different types such as arrays, functions, and pointers.

Filed Under: libstdc++testingc++type traits