summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/20_util/shared_ptr/creation/version.cc
blob: 0e47f19061d4a81dcef09af9a79c3f77cd5acc52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// { dg-options "-std=gnu++20" }
// { dg-do preprocess { target c++20 } }

// C++20 20.11.3.7 shared_ptr Creation [util.smartptr.shared.create]

#include <version>

#ifndef __cpp_lib_shared_ptr_arrays
# error "Feature-test macro for make_shared arrays missing in <version>"
#elif __cpp_lib_shared_ptr_arrays < 201707L
# error "Feature-test macro for make_shared arrays has wrong value in <version>"
#endif

#ifndef __cpp_lib_smart_ptr_for_overwrite
# error "Feature-test macro for make_shared_for_overwrite missing in <version>"
#elif __cpp_lib_smart_ptr_for_overwrite < 202002L
# error "Feature-test macro for make_shared_for_overwrite has wrong value in <version>"
#endif