diff --git a/libcxx/test/std/numerics/c.math/constexpr.cmath.pass.cpp b/libcxx/test/std/numerics/c.math/constexpr.cmath.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/numerics/c.math/constexpr.cmath.pass.cpp @@ -0,0 +1,277 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include +#include +#include + +#include "test_macros.h" +#include "hexfloat.h" + +void test_p0533r9() { + bool ImplementedP0533R9 = true; + +#if TEST_STD_VER >= 23 +# define ASSERT_CONSTEXPR_CXX23(Expr) static_assert(__builtin_constant_p(Expr) && (Expr)) +# define ASSERT_NOT_CONSTEXPR_CXX23(Expr) \ + static_assert(!__builtin_constant_p(Expr)); \ + assert(Expr); \ + ImplementedP0533R9 = false +#else +# define ASSERT_CONSTEXPR_CXX23(Expr) +# define ASSERT_NOT_CONSTEXPR_CXX23(Expr) + ImplementedP0533R9 = false; +#endif + + int DummyInt; + float DummyFloat; + double DummyDouble; + long double DummyLongDouble; + + ASSERT_NOT_CONSTEXPR_CXX23(std::abs(-1) == 1); // int abs(int j) + ASSERT_NOT_CONSTEXPR_CXX23(std::abs(-1L) == 1L); // long int abs(long int j) + ASSERT_NOT_CONSTEXPR_CXX23(std::abs(-1LL) == 1LL); // long long int abs(long long int j) + ASSERT_NOT_CONSTEXPR_CXX23(std::abs(-1.0f) == 1.0f); // float abs(float j) + ASSERT_NOT_CONSTEXPR_CXX23(std::abs(-1.0) == 1.0); // double abs(double j) + ASSERT_NOT_CONSTEXPR_CXX23(std::abs(-1.0L) == 1.0L); // long double abs(long double j) + + ASSERT_NOT_CONSTEXPR_CXX23(std::labs(-1L) == 1L); // long int labs(long int j) + ASSERT_NOT_CONSTEXPR_CXX23(std::llabs(-1LL) == 1LL); // long long int llabs(long long int j) + + ASSERT_NOT_CONSTEXPR_CXX23(std::div(13, 5).rem == 3); // div_t div(int numer, int denom) + ASSERT_NOT_CONSTEXPR_CXX23(std::div(13L, 5L).rem == 3L); // ldiv_t div(long int numer, long int denom) + ASSERT_NOT_CONSTEXPR_CXX23(std::div(13LL, 5LL).rem == 3LL); // lldiv_t div(long long int numer, long long int denom) + ASSERT_NOT_CONSTEXPR_CXX23(std::ldiv(13L, 5L).rem == 3L); // ldiv_t ldiv(long int numer, long int denom) + ASSERT_NOT_CONSTEXPR_CXX23( + std::lldiv(13LL, 5LL).rem == 3LL); // lldiv_t lldiv(long long int numer, long long int denom) + + ASSERT_NOT_CONSTEXPR_CXX23(std::frexp(0.0f, &DummyInt) == 0.0f); // float frexp(float value, int* exp) + ASSERT_NOT_CONSTEXPR_CXX23(std::frexp(0.0, &DummyInt) == 0.0); // double frexp(double value, int* exp) + ASSERT_NOT_CONSTEXPR_CXX23(std::frexp(0.0L, &DummyInt) == 0.0L); // long double frexp(long double value, int* exp) + ASSERT_NOT_CONSTEXPR_CXX23(std::frexpf(0.0f, &DummyInt) == 0.0f); // float frexpf(float value, int* exp) + ASSERT_NOT_CONSTEXPR_CXX23(std::frexpl(0.0L, &DummyInt) == 0.0L); // long double frexpl(long double value, int* exp) + + ASSERT_NOT_CONSTEXPR_CXX23(std::ilogb(1.0f) == 0); // int ilogb(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::ilogb(1.0) == 0); // int ilogb(double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::ilogb(1.0L) == 0); // int ilogb(long double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::ilogbf(1.0f) == 0); // int ilogbf(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::ilogbl(1.0L) == 0); // int ilogbl(long double x) + + ASSERT_NOT_CONSTEXPR_CXX23(std::ldexp(1.0f, 1) == 2.0f); // float ldexp(float x, int exp) + ASSERT_NOT_CONSTEXPR_CXX23(std::ldexp(1.0, 1) == 2.0); // double ldexp(double x, int exp) + ASSERT_NOT_CONSTEXPR_CXX23(std::ldexp(1.0L, 1) == 2.0L); // long double ldexp(long double x, int exp) + ASSERT_NOT_CONSTEXPR_CXX23(std::ldexpf(1.0f, 1) == 2.0f); // float ldexpf(float x, int exp) + ASSERT_NOT_CONSTEXPR_CXX23(std::ldexpl(1.0L, 1) == 2.0L); // long double ldexpl(long double x, int exp) + + ASSERT_NOT_CONSTEXPR_CXX23(std::logb(1.0f) == 0.0f); // float logb(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::logb(1.0) == 0.0); // double logb(double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::logb(1.0L) == 0.0L); // long double logb(long double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::logbf(1.0f) == 0.0f); // float logbf(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::logbl(1.0L) == 0.0L); // long double ilogbl(long double x) + + ASSERT_NOT_CONSTEXPR_CXX23(std::modf(1.0f, &DummyFloat) == 0.0f); // float modf(float value, float* iptr) + ASSERT_NOT_CONSTEXPR_CXX23(std::modf(1.0, &DummyDouble) == 0.0); // double modf(double value, double* iptr) + ASSERT_NOT_CONSTEXPR_CXX23( + std::modf(1.0L, &DummyLongDouble) == 0.0L); // long double modf(long double value, long double* iptr) + ASSERT_NOT_CONSTEXPR_CXX23(std::modff(1.0f, &DummyFloat) == 0.0f); // float modff(float value, float* iptr) + ASSERT_NOT_CONSTEXPR_CXX23( + std::modfl(1.0L, &DummyLongDouble) == 0.0L); // long double modfl(long double value, long double* iptr) + + ASSERT_NOT_CONSTEXPR_CXX23(std::scalbn(1.0f, 1) == 2.0f); // float scalbn(float x, int n) + ASSERT_NOT_CONSTEXPR_CXX23(std::scalbn(1.0, 1) == 2.0); // double scalbn(double x, int n) + ASSERT_NOT_CONSTEXPR_CXX23(std::scalbn(1.0L, 1) == 2.0L); // long double scalbn(long double x, int n) + ASSERT_NOT_CONSTEXPR_CXX23(std::scalbnf(1.0f, 1) == 2.0f); // float scalbnf(float x, int n) + ASSERT_NOT_CONSTEXPR_CXX23(std::scalbnl(1.0L, 1) == 2.0L); // long double scalbnl(long double x, int n) + + ASSERT_NOT_CONSTEXPR_CXX23(std::scalbln(1.0f, 1L) == 2); // float scalbln(float x, long int n) + ASSERT_NOT_CONSTEXPR_CXX23(std::scalbln(1.0, 1L) == 2.0); // double scalbln(double x, long int n) + ASSERT_NOT_CONSTEXPR_CXX23(std::scalbln(1.0L, 1L) == 2.0L); // long double scalbln(long double x, long int n) + ASSERT_NOT_CONSTEXPR_CXX23(std::scalblnf(1.0f, 1L) == 2.0f); // float scalblnf(float x, long int n) + ASSERT_NOT_CONSTEXPR_CXX23(std::scalblnl(1.0L, 1L) == 2.0L); // long double scalblnl(long double x, long int n) + + ASSERT_NOT_CONSTEXPR_CXX23(std::fabs(-1.0f) == 1.0f); // float fabs(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::fabs(-1.0) == 1.0); // double fabs(double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::fabs(-1.0L) == 1.0L); // long double fabs(long double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::fabsf(-1.0f) == 1.0f); // float fabsf(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::fabsl(-1.0L) == 1.0L); // long double fabsl(long double x) + + ASSERT_NOT_CONSTEXPR_CXX23(std::ceil(0.0f) == 0.0f); // float ceil(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::ceil(0.0) == 0.0); // double ceil(double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::ceil(0.0L) == 0.0L); // long double ceil(long double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::ceilf(0.0f) == 0.0f); // float ceilf(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::ceill(0.0L) == 0.0L); // long double ceill(long double x) + + ASSERT_NOT_CONSTEXPR_CXX23(std::floor(1.0f) == 1.0f); // float floor(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::floor(1.0) == 1.0); // double floor(double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::floor(1.0L) == 1.0L); // long double floor(long double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::floorf(1.0f) == 1.0f); // float floorf(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::floorl(1.0L) == 1.0L); // long double floorl(long double x) + + ASSERT_NOT_CONSTEXPR_CXX23(std::round(1.0f) == 1.0f); // float round(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::round(1.0) == 1.0); // double round(double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::round(1.0L) == 1.0L); // long double round(long double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::roundf(1.0f) == 1.0f); // float roundf(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::roundl(1.0L) == 1.0L); // long double roundl(long double x) + + ASSERT_NOT_CONSTEXPR_CXX23(std::lround(1.0f) == 1L); // long int round(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::lround(1.0) == 1L); // long int round(double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::lround(1.0L) == 1L); // long int round(long double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::lroundf(1.0f) == 1L); // long int roundf(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::lroundl(1.0L) == 1L); // long int roundl(long double x) + + ASSERT_NOT_CONSTEXPR_CXX23(std::llround(1.0f) == 1LL); // long long int round(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::llround(1.0) == 1LL); // long long int round(double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::llround(1.0L) == 1LL); // long long int round(long double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::llroundf(1.0f) == 1LL); // long long int roundf(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::llroundl(1.0L) == 1LL); // long long int roundl(long double x) + + ASSERT_NOT_CONSTEXPR_CXX23(std::trunc(1.0f) == 1.0f); // float trunc(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::trunc(1.0) == 1.0); // double trunc(double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::trunc(1.0L) == 1.0L); // long double trunc(long double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::truncf(1.0f) == 1.0f); // float truncf(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::truncl(1.0L) == 1.0L); // long double truncl(long double x) + + ASSERT_NOT_CONSTEXPR_CXX23(std::fmod(1.5f, 1.0f) == 0.5f); // float fmod(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23(std::fmod(1.5, 1.0) == 0.5); // double fmod(double x, double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::fmod(1.5L, 1.0L) == 0.5L); // long double fmod(long double x, long double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::fmodf(1.5f, 1.0f) == 0.5f); // float fmodf(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23(std::fmodl(1.5L, 1.0L) == 0.5L); // long double fmodl(long double x, long double y) + + ASSERT_NOT_CONSTEXPR_CXX23(std::remainder(0.5f, 1.0f) == 0.5f); // float remainder(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23(std::remainder(0.5, 1.0) == 0.5); // double remainder(double x, double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::remainder(0.5L, 1.0L) == 0.5L); // long double remainder(long double x, long double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::remainderf(0.5f, 1.0f) == 0.5f); // float remainderf(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23( + std::remainderl(0.5L, 1.0L) == 0.5L); // long double remainderl(long double x, long double y) + + ASSERT_NOT_CONSTEXPR_CXX23(std::remquo(0.5f, 1.0f, &DummyInt) == 0.5f); // float remquo(float x, float y, int* quo) + ASSERT_NOT_CONSTEXPR_CXX23(std::remquo(0.5, 1.0, &DummyInt) == 0.5); // double remquo(double x, double y, int* quo) + ASSERT_NOT_CONSTEXPR_CXX23( + std::remquo(0.5L, 1.0L, &DummyInt) == 0.5L); // long double remquo(long double x, long double y, int* quo) + ASSERT_NOT_CONSTEXPR_CXX23(std::remquof(0.5f, 1.0f, &DummyInt) == 0.5f); // float remquof(float x, float y, int* quo) + ASSERT_NOT_CONSTEXPR_CXX23( + std::remquol(0.5L, 1.0L, &DummyInt) == 0.5L); // long double remquol(long double x, long double y, int* quo) + + ASSERT_NOT_CONSTEXPR_CXX23(std::copysign(1.0f, 1.0f) == 1.0f); // float copysign(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23(std::copysign(1.0, 1.0) == 1.0); // double copysign(double x, double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::copysign(1.0L, 1.0L) == 1.0L); // long double copysign(long double x, long double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::copysignf(1.0f, 1.0f) == 1.0f); // float copysignf(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23(std::copysignl(1.0L, 1.0L) == 1.0L); // long double copysignl(long double x, long double y) + + ASSERT_NOT_CONSTEXPR_CXX23( + std::nextafter(0.0f, 1.0f) == hexfloat(0x1, 0, -149)); // float nextafter(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23( + std::nextafter(0.0, 1.0) == hexfloat(0x1, 0, -1074)); // double nextafter(double x, double y) + ASSERT_NOT_CONSTEXPR_CXX23( + std::nextafter(0.0L, 1.0L) == + hexfloat(0x1, 0, -16445)); // long double nextafter(long double x, long double y) + ASSERT_NOT_CONSTEXPR_CXX23( + std::nextafterf(0.0f, 1.0f) == hexfloat(0x1, 0, -149)); // float nextafterf(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23( + std::nextafterl(0.0L, 1.0L) == + hexfloat(0x1, 0, -16445)); // long double nextafterl(long double x, long double y) + + ASSERT_NOT_CONSTEXPR_CXX23( + std::nexttoward(0.0f, 1.0L) == hexfloat(0x1, 0, -149)); // float nexttoward(float x, long double y) + ASSERT_NOT_CONSTEXPR_CXX23( + std::nexttoward(0.0, 1.0L) == hexfloat(0x1, 0, -1074)); // double nexttoward(double x, long double y) + ASSERT_NOT_CONSTEXPR_CXX23( + std::nexttoward(0.0L, 1.0L) == + hexfloat(0x1, 0, -16445)); // long double nexttoward(long double x, long double y) + ASSERT_NOT_CONSTEXPR_CXX23( + std::nexttowardf(0.0f, 1.0L) == hexfloat(0x1, 0, -149)); // float nexttowardf(float x, long double y) + ASSERT_NOT_CONSTEXPR_CXX23( + std::nexttowardl(0.0L, 1.0L) == + hexfloat(0x1, 0, -16445)); // long double nexttowardl(long double x, long double y) + + ASSERT_NOT_CONSTEXPR_CXX23(std::fdim(1.0f, 0.0f) == 1.0f); // float fdim(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23(std::fdim(1.0, 0.0) == 1.0); // double fdim(double x, double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::fdim(1.0L, 0.0L) == 1.0L); // long double fdim(long double x, long double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::fdimf(1.0f, 0.0f) == 1.0f); // float fdimf(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23(std::fdiml(1.0L, 0.0L) == 1.0L); // long double fdiml(long double x, long double y) + + ASSERT_NOT_CONSTEXPR_CXX23(std::fmax(1.0f, 0.0f) == 1.0f); // float fmax(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23(std::fmax(1.0, 0.0) == 1.0); // double fmax(double x, double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::fmax(1.0L, 0.0L) == 1.0L); // long double fmax(long double x, long double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::fmaxf(1.0f, 0.0f) == 1.0f); // float fmaxf(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23(std::fmaxl(1.0L, 0.0L) == 1.0L); // long double fmaxl(long double x, long double y) + + ASSERT_NOT_CONSTEXPR_CXX23(std::fmin(1.0f, 0.0f) == 0.0f); // float fmin(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23(std::fmin(1.0, 0.0) == 0.0); // double fmin(double x, double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::fmin(1.0L, 0.0L) == 0.0L); // long double fmin(long double x, long double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::fminf(1.0f, 0.0f) == 0.0f); // float fminf(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23(std::fminl(1.0L, 0.0L) == 0.0L); // long double fminl(long double x, long double y) + + ASSERT_NOT_CONSTEXPR_CXX23(std::fma(1.0f, 1.0f, 1.0f) == 2.0f); // float fma(float x, float y, float z) + ASSERT_NOT_CONSTEXPR_CXX23(std::fma(1.0, 1.0, 1.0) == 2.0); // double fma(double x, double y, double z) + ASSERT_NOT_CONSTEXPR_CXX23( + std::fma(1.0L, 1.0L, 1.0L) == 2.0L); // long double fma(long double x, long double y, long double z) + ASSERT_NOT_CONSTEXPR_CXX23(std::fmaf(1.0f, 1.0f, 1.0f) == 2.0f); // float fmaf(float x, float y, float z) + ASSERT_NOT_CONSTEXPR_CXX23( + std::fmal(1.0L, 1.0L, 1.0L) == 2.0L); // long double fmal(long double x, long double y, long double z) + + ASSERT_NOT_CONSTEXPR_CXX23(std::fpclassify(-1.0f) == FP_NORMAL); // int fpclassify(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::fpclassify(-1.0) == FP_NORMAL); // int fpclassify(double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::fpclassify(-1.0L) == FP_NORMAL); // int fpclassify(long double x) + + ASSERT_NOT_CONSTEXPR_CXX23(std::isfinite(-1.0f) == 1); // int isfinite(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::isfinite(-1.0) == 1); // int isfinite(double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::isfinite(-1.0L) == 1); // int isfinite(long double x) + + ASSERT_NOT_CONSTEXPR_CXX23(std::isinf(-1.0f) == 0); // int isinf(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::isinf(-1.0) == 0); // int isinf(double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::isinf(-1.0L) == 0); // int isinf(long double x) + + ASSERT_NOT_CONSTEXPR_CXX23(std::isnan(-1.0f) == 0); // int isnan(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::isnan(-1.0) == 0); // int isnan(double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::isnan(-1.0L) == 0); // int isnan(long double x) + + ASSERT_NOT_CONSTEXPR_CXX23(std::isnormal(-1.0f) == 1); // int isnormal(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::isnormal(-1.0) == 1); // int isnormal(double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::isnormal(-1.0L) == 1); // int isnormal(long double x) + + ASSERT_NOT_CONSTEXPR_CXX23(std::signbit(-1.0f) == 1); // int signbit(float x) + ASSERT_NOT_CONSTEXPR_CXX23(std::signbit(-1.0) == 1); // int signbit(double x) + ASSERT_NOT_CONSTEXPR_CXX23(std::signbit(-1.0L) == 1); // int signbit(long double x) + + ASSERT_NOT_CONSTEXPR_CXX23(std::isgreater(-1.0f, 0.0f) == 0); // int isgreater(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23(std::isgreater(-1.0, 0.0) == 0); // int isgreater(double x, double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::isgreater(-1.0L, 0.0L) == 0); // int isgreater(long double x, long double y) + + ASSERT_NOT_CONSTEXPR_CXX23(std::isgreaterequal(-1.0f, 0.0f) == 0); // int isgreaterequal(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23(std::isgreaterequal(-1.0, 0.0) == 0); // int isgreaterequal(double x, double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::isgreaterequal(-1.0L, 0.0L) == 0); // int isgreaterequal(long double x, long double y) + + ASSERT_NOT_CONSTEXPR_CXX23(std::isless(-1.0f, 0.0f) == 1); // int isless(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23(std::isless(-1.0, 0.0) == 1); // int isless(double x, double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::isless(-1.0L, 0.0L) == 1); // int isless(long double x, long double y) + + ASSERT_NOT_CONSTEXPR_CXX23(std::islessequal(-1.0f, 0.0f) == 1); // int islessequal(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23(std::islessequal(-1.0, 0.0) == 1); // int islessequal(double x, double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::islessequal(-1.0L, 0.0L) == 1); // int islessequal(long double x, long double y) + + ASSERT_NOT_CONSTEXPR_CXX23(std::islessgreater(-1.0f, 0.0f) == 1); // int islessgreater(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23(std::islessgreater(-1.0, 0.0) == 1); // int islessgreater(double x, double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::islessgreater(-1.0L, 0.0L) == 1); // int islessgreater(long double x, long double y) + + ASSERT_NOT_CONSTEXPR_CXX23(std::isunordered(-1.0f, 0.0f) == 0); // int isunordered(float x, float y) + ASSERT_NOT_CONSTEXPR_CXX23(std::isunordered(-1.0, 0.0) == 0); // int isunordered(double x, double y) + ASSERT_NOT_CONSTEXPR_CXX23(std::isunordered(-1.0L, 0.0L) == 0); // int isunordered(long double x, long double y) + + assert(!ImplementedP0533R9 && R"( +Congratulations! You just have implemented P0533R9 (https://wg21.link/p0533r9). +Please go to `clang/www/cxx_status.html` and change the paper's implementation +status. Also please delete this assert and refactor `ASSERT_CONSTEXPR_CXX23` +and `ASSERT_NOT_CONSTEXPR_CXX23`. +)"); +} + +int main(int, char**) { + test_p0533r9(); + return 0; +}