[libc++][format] Disables the FTM on older MacOS versions. (#126547) · llvm/llvm-project@8b73dad (original) (raw)

`@@ -3685,11 +3685,17 @@

`

3685

3685

`# error "__cpp_lib_flat_set should not be defined before c++23"

`

3686

3686

`# endif

`

3687

3687

``

3688

``

`-

ifndef __cpp_lib_format

`

3689

``

`-

error "__cpp_lib_format should be defined in c++20"

`

3690

``

`-

endif

`

3691

``

`-

if __cpp_lib_format != 202110L

`

3692

``

`-

error "__cpp_lib_format should have the value 202110L in c++20"

`

``

3688

`+

if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT

`

``

3689

`+

ifndef __cpp_lib_format

`

``

3690

`+

error "__cpp_lib_format should be defined in c++20"

`

``

3691

`+

endif

`

``

3692

`+

if __cpp_lib_format != 202110L

`

``

3693

`+

error "__cpp_lib_format should have the value 202110L in c++20"

`

``

3694

`+

endif

`

``

3695

`+

else

`

``

3696

`+

ifdef __cpp_lib_format

`

``

3697

`+

error "__cpp_lib_format should not be defined when the requirement '!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT' is not met!"

`

``

3698

`+

endif

`

3693

3699

`# endif

`

3694

3700

``

3695

3701

`# ifdef __cpp_lib_format_path

`

5146

5152

`# endif

`

5147

5153

`# endif

`

5148

5154

``

5149

``

`-

ifndef __cpp_lib_format

`

5150

``

`-

error "__cpp_lib_format should be defined in c++23"

`

5151

``

`-

endif

`

5152

``

`-

if __cpp_lib_format != 202110L

`

5153

``

`-

error "__cpp_lib_format should have the value 202110L in c++23"

`

``

5155

`+

if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT

`

``

5156

`+

ifndef __cpp_lib_format

`

``

5157

`+

error "__cpp_lib_format should be defined in c++23"

`

``

5158

`+

endif

`

``

5159

`+

if __cpp_lib_format != 202110L

`

``

5160

`+

error "__cpp_lib_format should have the value 202110L in c++23"

`

``

5161

`+

endif

`

``

5162

`+

else

`

``

5163

`+

ifdef __cpp_lib_format

`

``

5164

`+

error "__cpp_lib_format should not be defined when the requirement '!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT' is not met!"

`

``

5165

`+

endif

`

5154

5166

`# endif

`

5155

5167

``

5156

5168

`# ifdef __cpp_lib_format_path

`

5679

5691

`# endif

`

5680

5692

`# endif

`

5681

5693

``

5682

``

`-

ifndef __cpp_lib_print

`

5683

``

`-

error "__cpp_lib_print should be defined in c++23"

`

5684

``

`-

endif

`

5685

``

`-

if __cpp_lib_print != 202207L

`

5686

``

`-

error "__cpp_lib_print should have the value 202207L in c++23"

`

``

5694

`+

if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT

`

``

5695

`+

ifndef __cpp_lib_print

`

``

5696

`+

error "__cpp_lib_print should be defined in c++23"

`

``

5697

`+

endif

`

``

5698

`+

if __cpp_lib_print != 202207L

`

``

5699

`+

error "__cpp_lib_print should have the value 202207L in c++23"

`

``

5700

`+

endif

`

``

5701

`+

else

`

``

5702

`+

ifdef __cpp_lib_print

`

``

5703

`+

error "__cpp_lib_print should not be defined when the requirement '!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT' is not met!"

`

``

5704

`+

endif

`

5687

5705

`# endif

`

5688

5706

``

5689

5707

`# if !defined(_LIBCPP_VERSION) || _LIBCPP_HAS_LOCALIZATION

`

6853

6871

`# endif

`

6854

6872

`# endif

`

6855

6873

``

6856

``

`-

ifndef __cpp_lib_format

`

6857

``

`-

error "__cpp_lib_format should be defined in c++26"

`

6858

``

`-

endif

`

6859

``

`-

if __cpp_lib_format != 202110L

`

6860

``

`-

error "__cpp_lib_format should have the value 202110L in c++26"

`

``

6874

`+

if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT

`

``

6875

`+

ifndef __cpp_lib_format

`

``

6876

`+

error "__cpp_lib_format should be defined in c++26"

`

``

6877

`+

endif

`

``

6878

`+

if __cpp_lib_format != 202110L

`

``

6879

`+

error "__cpp_lib_format should have the value 202110L in c++26"

`

``

6880

`+

endif

`

``

6881

`+

else

`

``

6882

`+

ifdef __cpp_lib_format

`

``

6883

`+

error "__cpp_lib_format should not be defined when the requirement '!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT' is not met!"

`

``

6884

`+

endif

`

6861

6885

`# endif

`

6862

6886

``

6863

6887

`# if !defined(_LIBCPP_VERSION)

`

7557

7581

`# endif

`

7558

7582

`# endif

`

7559

7583

``

7560

``

`-

ifndef __cpp_lib_print

`

7561

``

`-

error "__cpp_lib_print should be defined in c++26"

`

7562

``

`-

endif

`

7563

``

`-

if __cpp_lib_print != 202207L

`

7564

``

`-

error "__cpp_lib_print should have the value 202207L in c++26"

`

``

7584

`+

if !defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT

`

``

7585

`+

ifndef __cpp_lib_print

`

``

7586

`+

error "__cpp_lib_print should be defined in c++26"

`

``

7587

`+

endif

`

``

7588

`+

if __cpp_lib_print != 202207L

`

``

7589

`+

error "__cpp_lib_print should have the value 202207L in c++26"

`

``

7590

`+

endif

`

``

7591

`+

else

`

``

7592

`+

ifdef __cpp_lib_print

`

``

7593

`+

error "__cpp_lib_print should not be defined when the requirement '!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT' is not met!"

`

``

7594

`+

endif

`

7565

7595

`# endif

`

7566

7596

``

7567

7597

`# if !defined(_LIBCPP_VERSION) || _LIBCPP_HAS_LOCALIZATION

`