This moves the same_as, decay_t<_Up>> checks from the [cmp.alg] function bodies into their constraints. Also add a test for the compare_xxx_order_fallback algorithms. libstdc++-v3/ChangeLog: * libsupc++/compare (__decayed_same_as): New helper concept. (strong_order, weak_order, partial_order): Constrain with new concept instead of using static_assert. (compare_strong_order_fallback, compare_weak_order_fallback) (compare_partial_order_fallback): Likewise. Do not deduce return types. Remove redundant if-constexpr checks. * testsuite/18_support/comparisons/algorithms/fallback.cc: New test. Tested powerpc64le-linux. Committed to trunk.