1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// WARNING: This test was generated by generate_feature_test_macro_components.py
10// and should not be edited manually.
11//
12// clang-format off
13
14// <memory>
15
16// Test the feature test macros defined by <memory>
17
18/* Constant Value
19 __cpp_lib_addressof_constexpr 201603L [C++17]
20 __cpp_lib_allocate_at_least 202302L [C++23]
21 __cpp_lib_allocator_traits_is_always_equal 201411L [C++17]
22 __cpp_lib_assume_aligned 201811L [C++20]
23 __cpp_lib_atomic_value_initialization 201911L [C++20]
24 __cpp_lib_constexpr_dynamic_alloc 201907L [C++20]
25 __cpp_lib_constexpr_memory 201811L [C++20]
26 202202L [C++23]
27 __cpp_lib_enable_shared_from_this 201603L [C++17]
28 __cpp_lib_make_unique 201304L [C++14]
29 __cpp_lib_out_ptr 202106L [C++23]
30 202311L [C++26]
31 __cpp_lib_ranges 202207L [C++20]
32 __cpp_lib_raw_memory_algorithms 201606L [C++17]
33 __cpp_lib_shared_ptr_arrays 201611L [C++17]
34 201707L [C++20]
35 __cpp_lib_shared_ptr_weak_type 201606L [C++17]
36 __cpp_lib_smart_ptr_for_overwrite 202002L [C++20]
37 __cpp_lib_smart_ptr_owner_equality 202306L [C++26]
38 __cpp_lib_to_address 201711L [C++20]
39 __cpp_lib_transparent_operators 201210L [C++14]
40 201510L [C++17]
41*/
42
43#include <memory>
44#include "test_macros.h"
45
46#if TEST_STD_VER < 14
47
48# ifdef __cpp_lib_addressof_constexpr
49# error "__cpp_lib_addressof_constexpr should not be defined before c++17"
50# endif
51
52# ifdef __cpp_lib_allocate_at_least
53# error "__cpp_lib_allocate_at_least should not be defined before c++23"
54# endif
55
56# ifdef __cpp_lib_allocator_traits_is_always_equal
57# error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17"
58# endif
59
60# ifdef __cpp_lib_assume_aligned
61# error "__cpp_lib_assume_aligned should not be defined before c++20"
62# endif
63
64# ifdef __cpp_lib_atomic_value_initialization
65# error "__cpp_lib_atomic_value_initialization should not be defined before c++20"
66# endif
67
68# ifdef __cpp_lib_constexpr_dynamic_alloc
69# error "__cpp_lib_constexpr_dynamic_alloc should not be defined before c++20"
70# endif
71
72# ifdef __cpp_lib_constexpr_memory
73# error "__cpp_lib_constexpr_memory should not be defined before c++20"
74# endif
75
76# ifdef __cpp_lib_enable_shared_from_this
77# error "__cpp_lib_enable_shared_from_this should not be defined before c++17"
78# endif
79
80# ifdef __cpp_lib_make_unique
81# error "__cpp_lib_make_unique should not be defined before c++14"
82# endif
83
84# ifdef __cpp_lib_out_ptr
85# error "__cpp_lib_out_ptr should not be defined before c++23"
86# endif
87
88# ifdef __cpp_lib_ranges
89# error "__cpp_lib_ranges should not be defined before c++20"
90# endif
91
92# ifdef __cpp_lib_raw_memory_algorithms
93# error "__cpp_lib_raw_memory_algorithms should not be defined before c++17"
94# endif
95
96# ifdef __cpp_lib_shared_ptr_arrays
97# error "__cpp_lib_shared_ptr_arrays should not be defined before c++17"
98# endif
99
100# ifdef __cpp_lib_shared_ptr_weak_type
101# error "__cpp_lib_shared_ptr_weak_type should not be defined before c++17"
102# endif
103
104# ifdef __cpp_lib_smart_ptr_for_overwrite
105# error "__cpp_lib_smart_ptr_for_overwrite should not be defined before c++20"
106# endif
107
108# ifdef __cpp_lib_smart_ptr_owner_equality
109# error "__cpp_lib_smart_ptr_owner_equality should not be defined before c++26"
110# endif
111
112# ifdef __cpp_lib_to_address
113# error "__cpp_lib_to_address should not be defined before c++20"
114# endif
115
116# ifdef __cpp_lib_transparent_operators
117# error "__cpp_lib_transparent_operators should not be defined before c++14"
118# endif
119
120#elif TEST_STD_VER == 14
121
122# ifdef __cpp_lib_addressof_constexpr
123# error "__cpp_lib_addressof_constexpr should not be defined before c++17"
124# endif
125
126# ifdef __cpp_lib_allocate_at_least
127# error "__cpp_lib_allocate_at_least should not be defined before c++23"
128# endif
129
130# ifdef __cpp_lib_allocator_traits_is_always_equal
131# error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17"
132# endif
133
134# ifdef __cpp_lib_assume_aligned
135# error "__cpp_lib_assume_aligned should not be defined before c++20"
136# endif
137
138# ifdef __cpp_lib_atomic_value_initialization
139# error "__cpp_lib_atomic_value_initialization should not be defined before c++20"
140# endif
141
142# ifdef __cpp_lib_constexpr_dynamic_alloc
143# error "__cpp_lib_constexpr_dynamic_alloc should not be defined before c++20"
144# endif
145
146# ifdef __cpp_lib_constexpr_memory
147# error "__cpp_lib_constexpr_memory should not be defined before c++20"
148# endif
149
150# ifdef __cpp_lib_enable_shared_from_this
151# error "__cpp_lib_enable_shared_from_this should not be defined before c++17"
152# endif
153
154# ifndef __cpp_lib_make_unique
155# error "__cpp_lib_make_unique should be defined in c++14"
156# endif
157# if __cpp_lib_make_unique != 201304L
158# error "__cpp_lib_make_unique should have the value 201304L in c++14"
159# endif
160
161# ifdef __cpp_lib_out_ptr
162# error "__cpp_lib_out_ptr should not be defined before c++23"
163# endif
164
165# ifdef __cpp_lib_ranges
166# error "__cpp_lib_ranges should not be defined before c++20"
167# endif
168
169# ifdef __cpp_lib_raw_memory_algorithms
170# error "__cpp_lib_raw_memory_algorithms should not be defined before c++17"
171# endif
172
173# ifdef __cpp_lib_shared_ptr_arrays
174# error "__cpp_lib_shared_ptr_arrays should not be defined before c++17"
175# endif
176
177# ifdef __cpp_lib_shared_ptr_weak_type
178# error "__cpp_lib_shared_ptr_weak_type should not be defined before c++17"
179# endif
180
181# ifdef __cpp_lib_smart_ptr_for_overwrite
182# error "__cpp_lib_smart_ptr_for_overwrite should not be defined before c++20"
183# endif
184
185# ifdef __cpp_lib_smart_ptr_owner_equality
186# error "__cpp_lib_smart_ptr_owner_equality should not be defined before c++26"
187# endif
188
189# ifdef __cpp_lib_to_address
190# error "__cpp_lib_to_address should not be defined before c++20"
191# endif
192
193# ifndef __cpp_lib_transparent_operators
194# error "__cpp_lib_transparent_operators should be defined in c++14"
195# endif
196# if __cpp_lib_transparent_operators != 201210L
197# error "__cpp_lib_transparent_operators should have the value 201210L in c++14"
198# endif
199
200#elif TEST_STD_VER == 17
201
202# ifndef __cpp_lib_addressof_constexpr
203# error "__cpp_lib_addressof_constexpr should be defined in c++17"
204# endif
205# if __cpp_lib_addressof_constexpr != 201603L
206# error "__cpp_lib_addressof_constexpr should have the value 201603L in c++17"
207# endif
208
209# ifdef __cpp_lib_allocate_at_least
210# error "__cpp_lib_allocate_at_least should not be defined before c++23"
211# endif
212
213# ifndef __cpp_lib_allocator_traits_is_always_equal
214# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17"
215# endif
216# if __cpp_lib_allocator_traits_is_always_equal != 201411L
217# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17"
218# endif
219
220# ifdef __cpp_lib_assume_aligned
221# error "__cpp_lib_assume_aligned should not be defined before c++20"
222# endif
223
224# ifdef __cpp_lib_atomic_value_initialization
225# error "__cpp_lib_atomic_value_initialization should not be defined before c++20"
226# endif
227
228# ifdef __cpp_lib_constexpr_dynamic_alloc
229# error "__cpp_lib_constexpr_dynamic_alloc should not be defined before c++20"
230# endif
231
232# ifdef __cpp_lib_constexpr_memory
233# error "__cpp_lib_constexpr_memory should not be defined before c++20"
234# endif
235
236# ifndef __cpp_lib_enable_shared_from_this
237# error "__cpp_lib_enable_shared_from_this should be defined in c++17"
238# endif
239# if __cpp_lib_enable_shared_from_this != 201603L
240# error "__cpp_lib_enable_shared_from_this should have the value 201603L in c++17"
241# endif
242
243# ifndef __cpp_lib_make_unique
244# error "__cpp_lib_make_unique should be defined in c++17"
245# endif
246# if __cpp_lib_make_unique != 201304L
247# error "__cpp_lib_make_unique should have the value 201304L in c++17"
248# endif
249
250# ifdef __cpp_lib_out_ptr
251# error "__cpp_lib_out_ptr should not be defined before c++23"
252# endif
253
254# ifdef __cpp_lib_ranges
255# error "__cpp_lib_ranges should not be defined before c++20"
256# endif
257
258# ifndef __cpp_lib_raw_memory_algorithms
259# error "__cpp_lib_raw_memory_algorithms should be defined in c++17"
260# endif
261# if __cpp_lib_raw_memory_algorithms != 201606L
262# error "__cpp_lib_raw_memory_algorithms should have the value 201606L in c++17"
263# endif
264
265# ifndef __cpp_lib_shared_ptr_arrays
266# error "__cpp_lib_shared_ptr_arrays should be defined in c++17"
267# endif
268# if __cpp_lib_shared_ptr_arrays != 201611L
269# error "__cpp_lib_shared_ptr_arrays should have the value 201611L in c++17"
270# endif
271
272# ifndef __cpp_lib_shared_ptr_weak_type
273# error "__cpp_lib_shared_ptr_weak_type should be defined in c++17"
274# endif
275# if __cpp_lib_shared_ptr_weak_type != 201606L
276# error "__cpp_lib_shared_ptr_weak_type should have the value 201606L in c++17"
277# endif
278
279# ifdef __cpp_lib_smart_ptr_for_overwrite
280# error "__cpp_lib_smart_ptr_for_overwrite should not be defined before c++20"
281# endif
282
283# ifdef __cpp_lib_smart_ptr_owner_equality
284# error "__cpp_lib_smart_ptr_owner_equality should not be defined before c++26"
285# endif
286
287# ifdef __cpp_lib_to_address
288# error "__cpp_lib_to_address should not be defined before c++20"
289# endif
290
291# ifndef __cpp_lib_transparent_operators
292# error "__cpp_lib_transparent_operators should be defined in c++17"
293# endif
294# if __cpp_lib_transparent_operators != 201510L
295# error "__cpp_lib_transparent_operators should have the value 201510L in c++17"
296# endif
297
298#elif TEST_STD_VER == 20
299
300# ifndef __cpp_lib_addressof_constexpr
301# error "__cpp_lib_addressof_constexpr should be defined in c++20"
302# endif
303# if __cpp_lib_addressof_constexpr != 201603L
304# error "__cpp_lib_addressof_constexpr should have the value 201603L in c++20"
305# endif
306
307# ifdef __cpp_lib_allocate_at_least
308# error "__cpp_lib_allocate_at_least should not be defined before c++23"
309# endif
310
311# ifndef __cpp_lib_allocator_traits_is_always_equal
312# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++20"
313# endif
314# if __cpp_lib_allocator_traits_is_always_equal != 201411L
315# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20"
316# endif
317
318# ifndef __cpp_lib_assume_aligned
319# error "__cpp_lib_assume_aligned should be defined in c++20"
320# endif
321# if __cpp_lib_assume_aligned != 201811L
322# error "__cpp_lib_assume_aligned should have the value 201811L in c++20"
323# endif
324
325# ifndef __cpp_lib_atomic_value_initialization
326# error "__cpp_lib_atomic_value_initialization should be defined in c++20"
327# endif
328# if __cpp_lib_atomic_value_initialization != 201911L
329# error "__cpp_lib_atomic_value_initialization should have the value 201911L in c++20"
330# endif
331
332# ifndef __cpp_lib_constexpr_dynamic_alloc
333# error "__cpp_lib_constexpr_dynamic_alloc should be defined in c++20"
334# endif
335# if __cpp_lib_constexpr_dynamic_alloc != 201907L
336# error "__cpp_lib_constexpr_dynamic_alloc should have the value 201907L in c++20"
337# endif
338
339# ifndef __cpp_lib_constexpr_memory
340# error "__cpp_lib_constexpr_memory should be defined in c++20"
341# endif
342# if __cpp_lib_constexpr_memory != 201811L
343# error "__cpp_lib_constexpr_memory should have the value 201811L in c++20"
344# endif
345
346# ifndef __cpp_lib_enable_shared_from_this
347# error "__cpp_lib_enable_shared_from_this should be defined in c++20"
348# endif
349# if __cpp_lib_enable_shared_from_this != 201603L
350# error "__cpp_lib_enable_shared_from_this should have the value 201603L in c++20"
351# endif
352
353# ifndef __cpp_lib_make_unique
354# error "__cpp_lib_make_unique should be defined in c++20"
355# endif
356# if __cpp_lib_make_unique != 201304L
357# error "__cpp_lib_make_unique should have the value 201304L in c++20"
358# endif
359
360# ifdef __cpp_lib_out_ptr
361# error "__cpp_lib_out_ptr should not be defined before c++23"
362# endif
363
364# ifndef __cpp_lib_ranges
365# error "__cpp_lib_ranges should be defined in c++20"
366# endif
367# if __cpp_lib_ranges != 202207L
368# error "__cpp_lib_ranges should have the value 202207L in c++20"
369# endif
370
371# ifndef __cpp_lib_raw_memory_algorithms
372# error "__cpp_lib_raw_memory_algorithms should be defined in c++20"
373# endif
374# if __cpp_lib_raw_memory_algorithms != 201606L
375# error "__cpp_lib_raw_memory_algorithms should have the value 201606L in c++20"
376# endif
377
378# ifndef __cpp_lib_shared_ptr_arrays
379# error "__cpp_lib_shared_ptr_arrays should be defined in c++20"
380# endif
381# if __cpp_lib_shared_ptr_arrays != 201707L
382# error "__cpp_lib_shared_ptr_arrays should have the value 201707L in c++20"
383# endif
384
385# ifndef __cpp_lib_shared_ptr_weak_type
386# error "__cpp_lib_shared_ptr_weak_type should be defined in c++20"
387# endif
388# if __cpp_lib_shared_ptr_weak_type != 201606L
389# error "__cpp_lib_shared_ptr_weak_type should have the value 201606L in c++20"
390# endif
391
392# if !defined(_LIBCPP_VERSION)
393# ifndef __cpp_lib_smart_ptr_for_overwrite
394# error "__cpp_lib_smart_ptr_for_overwrite should be defined in c++20"
395# endif
396# if __cpp_lib_smart_ptr_for_overwrite != 202002L
397# error "__cpp_lib_smart_ptr_for_overwrite should have the value 202002L in c++20"
398# endif
399# else // _LIBCPP_VERSION
400# ifdef __cpp_lib_smart_ptr_for_overwrite
401# error "__cpp_lib_smart_ptr_for_overwrite should not be defined because it is unimplemented in libc++!"
402# endif
403# endif
404
405# ifdef __cpp_lib_smart_ptr_owner_equality
406# error "__cpp_lib_smart_ptr_owner_equality should not be defined before c++26"
407# endif
408
409# ifndef __cpp_lib_to_address
410# error "__cpp_lib_to_address should be defined in c++20"
411# endif
412# if __cpp_lib_to_address != 201711L
413# error "__cpp_lib_to_address should have the value 201711L in c++20"
414# endif
415
416# ifndef __cpp_lib_transparent_operators
417# error "__cpp_lib_transparent_operators should be defined in c++20"
418# endif
419# if __cpp_lib_transparent_operators != 201510L
420# error "__cpp_lib_transparent_operators should have the value 201510L in c++20"
421# endif
422
423#elif TEST_STD_VER == 23
424
425# ifndef __cpp_lib_addressof_constexpr
426# error "__cpp_lib_addressof_constexpr should be defined in c++23"
427# endif
428# if __cpp_lib_addressof_constexpr != 201603L
429# error "__cpp_lib_addressof_constexpr should have the value 201603L in c++23"
430# endif
431
432# ifndef __cpp_lib_allocate_at_least
433# error "__cpp_lib_allocate_at_least should be defined in c++23"
434# endif
435# if __cpp_lib_allocate_at_least != 202302L
436# error "__cpp_lib_allocate_at_least should have the value 202302L in c++23"
437# endif
438
439# ifndef __cpp_lib_allocator_traits_is_always_equal
440# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++23"
441# endif
442# if __cpp_lib_allocator_traits_is_always_equal != 201411L
443# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++23"
444# endif
445
446# ifndef __cpp_lib_assume_aligned
447# error "__cpp_lib_assume_aligned should be defined in c++23"
448# endif
449# if __cpp_lib_assume_aligned != 201811L
450# error "__cpp_lib_assume_aligned should have the value 201811L in c++23"
451# endif
452
453# ifndef __cpp_lib_atomic_value_initialization
454# error "__cpp_lib_atomic_value_initialization should be defined in c++23"
455# endif
456# if __cpp_lib_atomic_value_initialization != 201911L
457# error "__cpp_lib_atomic_value_initialization should have the value 201911L in c++23"
458# endif
459
460# ifndef __cpp_lib_constexpr_dynamic_alloc
461# error "__cpp_lib_constexpr_dynamic_alloc should be defined in c++23"
462# endif
463# if __cpp_lib_constexpr_dynamic_alloc != 201907L
464# error "__cpp_lib_constexpr_dynamic_alloc should have the value 201907L in c++23"
465# endif
466
467# ifndef __cpp_lib_constexpr_memory
468# error "__cpp_lib_constexpr_memory should be defined in c++23"
469# endif
470# if __cpp_lib_constexpr_memory != 202202L
471# error "__cpp_lib_constexpr_memory should have the value 202202L in c++23"
472# endif
473
474# ifndef __cpp_lib_enable_shared_from_this
475# error "__cpp_lib_enable_shared_from_this should be defined in c++23"
476# endif
477# if __cpp_lib_enable_shared_from_this != 201603L
478# error "__cpp_lib_enable_shared_from_this should have the value 201603L in c++23"
479# endif
480
481# ifndef __cpp_lib_make_unique
482# error "__cpp_lib_make_unique should be defined in c++23"
483# endif
484# if __cpp_lib_make_unique != 201304L
485# error "__cpp_lib_make_unique should have the value 201304L in c++23"
486# endif
487
488# if !defined(_LIBCPP_VERSION)
489# ifndef __cpp_lib_out_ptr
490# error "__cpp_lib_out_ptr should be defined in c++23"
491# endif
492# if __cpp_lib_out_ptr != 202106L
493# error "__cpp_lib_out_ptr should have the value 202106L in c++23"
494# endif
495# else // _LIBCPP_VERSION
496# ifdef __cpp_lib_out_ptr
497# error "__cpp_lib_out_ptr should not be defined because it is unimplemented in libc++!"
498# endif
499# endif
500
501# ifndef __cpp_lib_ranges
502# error "__cpp_lib_ranges should be defined in c++23"
503# endif
504# if __cpp_lib_ranges != 202207L
505# error "__cpp_lib_ranges should have the value 202207L in c++23"
506# endif
507
508# ifndef __cpp_lib_raw_memory_algorithms
509# error "__cpp_lib_raw_memory_algorithms should be defined in c++23"
510# endif
511# if __cpp_lib_raw_memory_algorithms != 201606L
512# error "__cpp_lib_raw_memory_algorithms should have the value 201606L in c++23"
513# endif
514
515# ifndef __cpp_lib_shared_ptr_arrays
516# error "__cpp_lib_shared_ptr_arrays should be defined in c++23"
517# endif
518# if __cpp_lib_shared_ptr_arrays != 201707L
519# error "__cpp_lib_shared_ptr_arrays should have the value 201707L in c++23"
520# endif
521
522# ifndef __cpp_lib_shared_ptr_weak_type
523# error "__cpp_lib_shared_ptr_weak_type should be defined in c++23"
524# endif
525# if __cpp_lib_shared_ptr_weak_type != 201606L
526# error "__cpp_lib_shared_ptr_weak_type should have the value 201606L in c++23"
527# endif
528
529# if !defined(_LIBCPP_VERSION)
530# ifndef __cpp_lib_smart_ptr_for_overwrite
531# error "__cpp_lib_smart_ptr_for_overwrite should be defined in c++23"
532# endif
533# if __cpp_lib_smart_ptr_for_overwrite != 202002L
534# error "__cpp_lib_smart_ptr_for_overwrite should have the value 202002L in c++23"
535# endif
536# else // _LIBCPP_VERSION
537# ifdef __cpp_lib_smart_ptr_for_overwrite
538# error "__cpp_lib_smart_ptr_for_overwrite should not be defined because it is unimplemented in libc++!"
539# endif
540# endif
541
542# ifdef __cpp_lib_smart_ptr_owner_equality
543# error "__cpp_lib_smart_ptr_owner_equality should not be defined before c++26"
544# endif
545
546# ifndef __cpp_lib_to_address
547# error "__cpp_lib_to_address should be defined in c++23"
548# endif
549# if __cpp_lib_to_address != 201711L
550# error "__cpp_lib_to_address should have the value 201711L in c++23"
551# endif
552
553# ifndef __cpp_lib_transparent_operators
554# error "__cpp_lib_transparent_operators should be defined in c++23"
555# endif
556# if __cpp_lib_transparent_operators != 201510L
557# error "__cpp_lib_transparent_operators should have the value 201510L in c++23"
558# endif
559
560#elif TEST_STD_VER > 23
561
562# ifndef __cpp_lib_addressof_constexpr
563# error "__cpp_lib_addressof_constexpr should be defined in c++26"
564# endif
565# if __cpp_lib_addressof_constexpr != 201603L
566# error "__cpp_lib_addressof_constexpr should have the value 201603L in c++26"
567# endif
568
569# ifndef __cpp_lib_allocate_at_least
570# error "__cpp_lib_allocate_at_least should be defined in c++26"
571# endif
572# if __cpp_lib_allocate_at_least != 202302L
573# error "__cpp_lib_allocate_at_least should have the value 202302L in c++26"
574# endif
575
576# ifndef __cpp_lib_allocator_traits_is_always_equal
577# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++26"
578# endif
579# if __cpp_lib_allocator_traits_is_always_equal != 201411L
580# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++26"
581# endif
582
583# ifndef __cpp_lib_assume_aligned
584# error "__cpp_lib_assume_aligned should be defined in c++26"
585# endif
586# if __cpp_lib_assume_aligned != 201811L
587# error "__cpp_lib_assume_aligned should have the value 201811L in c++26"
588# endif
589
590# ifndef __cpp_lib_atomic_value_initialization
591# error "__cpp_lib_atomic_value_initialization should be defined in c++26"
592# endif
593# if __cpp_lib_atomic_value_initialization != 201911L
594# error "__cpp_lib_atomic_value_initialization should have the value 201911L in c++26"
595# endif
596
597# ifndef __cpp_lib_constexpr_dynamic_alloc
598# error "__cpp_lib_constexpr_dynamic_alloc should be defined in c++26"
599# endif
600# if __cpp_lib_constexpr_dynamic_alloc != 201907L
601# error "__cpp_lib_constexpr_dynamic_alloc should have the value 201907L in c++26"
602# endif
603
604# ifndef __cpp_lib_constexpr_memory
605# error "__cpp_lib_constexpr_memory should be defined in c++26"
606# endif
607# if __cpp_lib_constexpr_memory != 202202L
608# error "__cpp_lib_constexpr_memory should have the value 202202L in c++26"
609# endif
610
611# ifndef __cpp_lib_enable_shared_from_this
612# error "__cpp_lib_enable_shared_from_this should be defined in c++26"
613# endif
614# if __cpp_lib_enable_shared_from_this != 201603L
615# error "__cpp_lib_enable_shared_from_this should have the value 201603L in c++26"
616# endif
617
618# ifndef __cpp_lib_make_unique
619# error "__cpp_lib_make_unique should be defined in c++26"
620# endif
621# if __cpp_lib_make_unique != 201304L
622# error "__cpp_lib_make_unique should have the value 201304L in c++26"
623# endif
624
625# if !defined(_LIBCPP_VERSION)
626# ifndef __cpp_lib_out_ptr
627# error "__cpp_lib_out_ptr should be defined in c++26"
628# endif
629# if __cpp_lib_out_ptr != 202311L
630# error "__cpp_lib_out_ptr should have the value 202311L in c++26"
631# endif
632# else // _LIBCPP_VERSION
633# ifdef __cpp_lib_out_ptr
634# error "__cpp_lib_out_ptr should not be defined because it is unimplemented in libc++!"
635# endif
636# endif
637
638# ifndef __cpp_lib_ranges
639# error "__cpp_lib_ranges should be defined in c++26"
640# endif
641# if __cpp_lib_ranges != 202207L
642# error "__cpp_lib_ranges should have the value 202207L in c++26"
643# endif
644
645# ifndef __cpp_lib_raw_memory_algorithms
646# error "__cpp_lib_raw_memory_algorithms should be defined in c++26"
647# endif
648# if __cpp_lib_raw_memory_algorithms != 201606L
649# error "__cpp_lib_raw_memory_algorithms should have the value 201606L in c++26"
650# endif
651
652# ifndef __cpp_lib_shared_ptr_arrays
653# error "__cpp_lib_shared_ptr_arrays should be defined in c++26"
654# endif
655# if __cpp_lib_shared_ptr_arrays != 201707L
656# error "__cpp_lib_shared_ptr_arrays should have the value 201707L in c++26"
657# endif
658
659# ifndef __cpp_lib_shared_ptr_weak_type
660# error "__cpp_lib_shared_ptr_weak_type should be defined in c++26"
661# endif
662# if __cpp_lib_shared_ptr_weak_type != 201606L
663# error "__cpp_lib_shared_ptr_weak_type should have the value 201606L in c++26"
664# endif
665
666# if !defined(_LIBCPP_VERSION)
667# ifndef __cpp_lib_smart_ptr_for_overwrite
668# error "__cpp_lib_smart_ptr_for_overwrite should be defined in c++26"
669# endif
670# if __cpp_lib_smart_ptr_for_overwrite != 202002L
671# error "__cpp_lib_smart_ptr_for_overwrite should have the value 202002L in c++26"
672# endif
673# else // _LIBCPP_VERSION
674# ifdef __cpp_lib_smart_ptr_for_overwrite
675# error "__cpp_lib_smart_ptr_for_overwrite should not be defined because it is unimplemented in libc++!"
676# endif
677# endif
678
679# if !defined(_LIBCPP_VERSION)
680# ifndef __cpp_lib_smart_ptr_owner_equality
681# error "__cpp_lib_smart_ptr_owner_equality should be defined in c++26"
682# endif
683# if __cpp_lib_smart_ptr_owner_equality != 202306L
684# error "__cpp_lib_smart_ptr_owner_equality should have the value 202306L in c++26"
685# endif
686# else // _LIBCPP_VERSION
687# ifdef __cpp_lib_smart_ptr_owner_equality
688# error "__cpp_lib_smart_ptr_owner_equality should not be defined because it is unimplemented in libc++!"
689# endif
690# endif
691
692# ifndef __cpp_lib_to_address
693# error "__cpp_lib_to_address should be defined in c++26"
694# endif
695# if __cpp_lib_to_address != 201711L
696# error "__cpp_lib_to_address should have the value 201711L in c++26"
697# endif
698
699# ifndef __cpp_lib_transparent_operators
700# error "__cpp_lib_transparent_operators should be defined in c++26"
701# endif
702# if __cpp_lib_transparent_operators != 201510L
703# error "__cpp_lib_transparent_operators should have the value 201510L in c++26"
704# endif
705
706#endif // TEST_STD_VER > 23
707
708

source code of libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.compile.pass.cpp