이름공간
변수
행위

Feature testing (C++20)

cppreference.com
< cpp

The standard defines a set of preprocessor macros corresponding to C++ language and library features introduced in C++11 or later. They are intended as a simple and portable way to detect the presence of said features.

목차

[편집]Attributes

__has_cpp_attribute(attribute-token)

Checks for the presence of an attribute named by attribute-token (after macro expansion).

For standard attributes, it will expand to the year and month in which the attribute was added to the working draft (see table below), the presence of vendor-specific attributes is determined by a non-zero value.

__has_cpp_attribute can be expanded in the expression of #if and #elif. It is treated as a defined macro by #ifdef, #ifndef and defined but cannot be used anywhere else.

attribute-token Attribute Value Standard
carries_dependency[[carries_dependency]]200809L(C++11)
deprecated[[deprecated]]201309L(C++14)
fallthrough[[fallthrough]]201603L(C++17)
likely[[likely]]201803L(C++20)
maybe_unused[[maybe_unused]]201603L(C++17)
no_unique_address[[no_unique_address]]201803L(C++20)
nodiscard[[nodiscard]]201603L(C++17)
201907L(C++20)
noreturn[[noreturn]]200809L(C++11)
unlikely[[unlikely]]201803L(C++20)

[편집]Language features

The following macros are predefined in every translation unit. Each macro expands to an integer literal corresponding to the year and month when the corresponding feature has been included in the working draft.

When a feature changes significantly, the macro will be updated accordingly.

Macro name Feature Value Std
__cpp_aggregate_basesAggregate classes with base classes 201603L(C++17)
__cpp_aggregate_nsdmiAggregate classes with default member initializers201304L(C++14)
__cpp_aggregate_paren_initAggregate initialization in the form of direct initialization201902L(C++20)
__cpp_alias_templatesAlias templates200704L(C++11)
__cpp_aligned_newDynamic memory allocation for over-aligned data201606L(C++17)
__cpp_attributesAttributes200809L(C++11)
__cpp_binary_literalsBinary literals201304L(C++14)
__cpp_capture_star_thisLambda capture of *this by value as [=,*this] 201603L(C++17)
__cpp_char8_tchar8_t201811L(C++20)
__cpp_conceptsConcepts201907L(C++20)
__cpp_conditional_explicitexplicit(bool)201806L(C++20)
__cpp_constevalImmediate functions201811L(C++20)
__cpp_constexprconstexpr200704L(C++11)
Relaxed constexpr, non-constconstexpr methods201304L(C++14)
Constexpr lambda201603L(C++17)
Trivial default initialization and asm-declaration in constexpr functions 201907L(C++20)
Non-literal variables, labels, and goto statements in constexpr functions 202110L(C++23)
__cpp_constexpr_dynamic_alloc Operations for dynamic storage duration in constexpr functions 201907L(C++20)
__cpp_constexpr_in_decltype Generation of function and variable definitions when needed for constant evaluation201711L(C++20)
__cpp_constinitconstinit201907L(C++20)
__cpp_decltypedecltype200707L(C++11)
__cpp_decltype_autoReturn type deduction for normal functions201304L(C++14)
__cpp_deduction_guidesTemplate argument deduction for class templates201703L(C++17)
CTAD for aggregates and aliases 201907L(C++20)
__cpp_delegating_constructorsDelegating constructors200604L(C++11)
__cpp_designated_initializersDesignated initializer201707L(C++20)
__cpp_enumerator_attributes Attributes for enumerators201411L(C++17)
__cpp_explicit_this_parameter Explicit object parameter 202110L(C++23)
__cpp_fold_expressionsFold expressions201603L(C++17)
__cpp_generic_lambdasGeneric lambda expressions201304L(C++14)
Explicit template parameter list for generic lambdas201707L(C++20)
__cpp_guaranteed_copy_elision Guaranteed copy elision through simplified value categories201606L(C++17)
__cpp_hex_floatHexadecimal floating literals201603L(C++17)
__cpp_if_constevalconsteval if202106L(C++23)
__cpp_if_constexprconstexpr if201606L(C++17)
__cpp_impl_coroutineCoroutines (compiler support) 201902L(C++20)
__cpp_impl_destroying_deleteDestroying operator delete (compiler support) 201806L(C++20)
__cpp_impl_three_way_comparisonThree-way comparison (compiler support) 201907L(C++20)
__cpp_inheriting_constructorsInheriting constructors200802L(C++11)
Rewording inheriting constructors 201511L(C++17)
__cpp_init_capturesLambda init-capture201304L(C++14)
Allow pack expansion in lambda init-capture 201803L(C++20)
__cpp_initializer_listsList-initialization and std::initializer_list200806L(C++11)
__cpp_inline_variablesInline variables201606L(C++17)
__cpp_lambdasLambda expressions200907L(C++11)
__cpp_modulesModules201907L(C++20)
__cpp_multidimensional_subscript Multidimensional subscript operator202110L(C++23)
__cpp_namespace_attributes Attributes for namespaces201411L(C++17)
__cpp_noexcept_function_type Make exception specifications be part of the type system 201510L(C++17)
__cpp_nontype_template_args Allow constant evaluation for all non-type template arguments201411L(C++17)
Class types and floating-point types in non-type template parameters201911L(C++20)
__cpp_nontype_template_parameter_auto Declaring non-type template parameters with auto201606L(C++17)
__cpp_nsdmiNon-static data member initializers200809L(C++11)
__cpp_range_based_forRange-based for loop200907L(C++11)
Range-based for loop with different begin/end types 201603L(C++17)
__cpp_raw_stringsRaw string literals200710L(C++11)
__cpp_ref_qualifiersref-qualifiers200710L(C++11)
__cpp_return_type_deductionReturn type deduction for normal functions201304L(C++14)
__cpp_rvalue_referencesRvalue reference200610L(C++11)
__cpp_size_t_suffixLiteral suffixes for size_t and its signed version202011L(C++23)
__cpp_sized_deallocationSized deallocation201309L(C++14)
__cpp_static_assertstatic_assert200410L(C++11)
Single-argument static_assert201411L(C++17)
__cpp_structured_bindingsStructured bindings201606L(C++17)
__cpp_template_template_args Matching of template template-arguments201611L(C++17)
__cpp_threadsafe_static_initDynamic initialization and destruction with concurrency200806L(C++11)
__cpp_unicode_charactersNew character types (char16_t and char32_t) 200704L(C++11)
__cpp_unicode_literalsUnicode string literals200710L(C++11)
__cpp_user_defined_literalsUser-defined literals200809L(C++11)
__cpp_using_enumusing enum201907L(C++20)
__cpp_variable_templatesVariable templates201304L(C++14)
__cpp_variadic_templatesVariadic templates200704L(C++11)
__cpp_variadic_using Pack expansions in using-declarations201611L(C++17)


[편집]Library features

The following macros are defined if the header <version> or any of the corresponding headers in the table below is included. Each macro expands to an integer literal corresponding to the year and month when the corresponding feature has been included in the working draft.

When a feature changes significantly, the macro will be updated accordingly.

Macro name Feature Value Header Std
__cpp_lib_adaptor_iterator_pair_constructor Iterator pair constructors for std::stack and std::queue202106L<stack><queue>(C++23)
__cpp_lib_addressof_constexpr Constexpr std::addressof201603L<memory>(C++17)
__cpp_lib_allocate_at_leaststd::allocate_at_least etc. 202106L<memory>(C++23)
__cpp_lib_allocator_traits_is_always_equalstd::allocator_traits::is_always_equal201411L<memory><scoped_allocator><string><deque><forward_list><list><vector><map><set><unordered_map><unordered_set>(C++17)
__cpp_lib_anystd::any201606L<any>(C++17)
__cpp_lib_applystd::apply201603L<tuple>(C++17)
__cpp_lib_array_constexpr Constexpr for std::reverse_iterator, std::move_iterator, std::array and range access201603L<iterator><array>(C++17)
ConstexprIterator; constexpr comparison for std::array; misc constexpr bits (std::array::fill et al.) 201811L<iterator><array>(C++20)
__cpp_lib_as_conststd::as_const201510L<utility>(C++17)
__cpp_lib_associative_heterogeneous_erasure Heterogeneous erasure in associative containers and unordered associative containers202110L<map><set><unordered_map><unordered_set>(C++23)
__cpp_lib_assume_alignedstd::assume_aligned201811L<memory>(C++20)
__cpp_lib_atomic_flag_teststd::atomic_flag::test201907L<atomic>(C++20)
__cpp_lib_atomic_floatFloating-point atomic201711L<atomic>(C++20)
__cpp_lib_atomic_is_always_lock_freeconstexpr atomic<T>::is_always_lock_free201603L<atomic>(C++17)
__cpp_lib_atomic_lock_free_type_aliases atomic lockfree integral types (std::atomic_signed_lock_free, std::atomic_unsigned_lock_free) 201907L<atomic>(C++20)
__cpp_lib_atomic_refstd::atomic_ref201806L<atomic>(C++20)
__cpp_lib_atomic_shared_ptrstd::atomic<std::shared_ptr>201711L<memory>(C++20)
__cpp_lib_atomic_value_initialization Fixing atomic initialization (value-initialize std::atomic by default) 201911L<atomic><memory>(C++20)
__cpp_lib_atomic_wait Efficient std::atomic waiting 201907L<atomic>(C++20)
__cpp_lib_barrierstd::barrier201907L<barrier>(C++20)
__cpp_lib_bind_frontstd::bind_front201907L<functional>(C++20)
__cpp_lib_bit_caststd::bit_cast201806L<bit>(C++20)
__cpp_lib_bitopsBit operations201907L<bit>(C++20)
__cpp_lib_bool_constantstd::bool_constant201505L<type_traits>(C++17)
__cpp_lib_bounded_array_traitsstd::is_bounded_array, std::is_unbounded_array201902L<type_traits>(C++20)
__cpp_lib_boyer_moore_searcherstd::boyer_moore_searcher201603L<functional>(C++17)
__cpp_lib_bytestd::byte201603L<cstddef>(C++17)
__cpp_lib_byteswapstd::byteswap202110L<bit>(C++23)
__cpp_lib_char8_t Library support for char8_t201907L<atomic><filesystem><istream><limits><locale><ostream><string><string_view>(C++20)
__cpp_lib_chrono Rounding functions for std::chrono::duration and std::chrono::time_point201510L<chrono>(C++17)
Constexpr for all the member functions of std::chrono::duration and std::chrono::time_point201611L<chrono>(C++17)
Calendars and Time Zones201907L<chrono>(C++20)
__cpp_lib_chrono_udlsUser-defined literals for time types201304L<chrono>(C++14)
__cpp_lib_clampstd::clamp201603L<algorithm>(C++17)
__cpp_lib_complex_udlsUser-defined Literals for std::complex201309L<complex>(C++14)
__cpp_lib_conceptsStandard library concepts202002L<concepts>(C++20)
__cpp_lib_constexpr_algorithms Constexpr for algorithms201806L<algorithm>(C++20)
__cpp_lib_constexpr_complex Constexpr for std::complex201711L<complex>(C++20)
__cpp_lib_constexpr_dynamic_alloc Constexpr for std::allocator and related utilities 201907L<memory>(C++20)
__cpp_lib_constexpr_functional Misc constexpr bits (std::default_searcher); constexpr INVOKE 201907L<functional>(C++20)
__cpp_lib_constexpr_iterator Misc constexpr bits (std::insert_iterator et al.) 201811L<iterator>(C++20)
__cpp_lib_constexpr_memory Constexpr in std::pointer_traits201811L<memory>(C++20)
__cpp_lib_constexpr_numeric Constexpr for <numeric> algorithms201911L<numeric>(C++20)
__cpp_lib_constexpr_string Constexpr for std::string201907L<string>(C++20)
__cpp_lib_constexpr_string_view Misc constexpr bits (std::string_view::copy) 201811L<string_view>(C++20)
__cpp_lib_constexpr_tuple Misc constexpr bits (std::tuple::operator= et al.) 201811L<tuple>(C++20)
__cpp_lib_constexpr_typeinfo Constexpr for std::type_info::operator==202106L<typeinfo>(C++23)
__cpp_lib_constexpr_utility Misc constexpr bits (std::pair::operator= et al.) 201811L<utility>(C++20)
__cpp_lib_constexpr_vector Constexpr for std::vector201907L<vector>(C++20)
__cpp_lib_coroutineCoroutines (library support) 201902L<coroutine>(C++20)
__cpp_lib_destroying_deleteDestroying operator delete (library support) 201806L<new>(C++20)
__cpp_lib_enable_shared_from_this More precise specification of std::enable_shared_from_this201603L<memory>(C++17)
__cpp_lib_endianstd::endian201907L<bit>(C++20)
__cpp_lib_erase_if Uniform container erasure 202002L<string><deque><forward_list><list><vector><map><set><unordered_map><unordered_set>(C++20)
__cpp_lib_exchange_functionstd::exchange201304L<utility>(C++14)
__cpp_lib_executionExecution policies201603L<execution>(C++17)
std::execution::unsequenced_policy201902L<execution>(C++20)
__cpp_lib_filesystemFilesystem library201703L<filesystem>(C++17)
__cpp_lib_formatText formatting201907L<format>(C++20)
Compile-time format string checks; Reducing parameterization of std::vformat_to202106L<format>(C++23)
Fixing locale handling in chrono formatters; Use of forwarding references in format arguments 202110L<format>(C++23)
__cpp_lib_gcd_lcmstd::gcd, std::lcm201606L<numeric>(C++17)
__cpp_lib_generic_associative_lookup Heterogeneous comparison lookup in associative containers201304L<map><set>(C++14)
__cpp_lib_generic_unordered_lookup Heterogeneous comparison lookup in unordered associative containers201811L<unordered_map><unordered_set>(C++20)
__cpp_lib_hardware_interference_sizeconstexpr std::hardware_{constructive, destructive}_interference_size201703L<new>(C++17)
__cpp_lib_has_unique_object_representationsstd::has_unique_object_representations201606L<type_traits>(C++17)
__cpp_lib_hypot 3-argument overload of std::hypot201603L<cmath>(C++17)
__cpp_lib_incomplete_container_elements Minimal incomplete type support for standard containers 201505L<forward_list><list><vector>(C++17)
__cpp_lib_int_pow2Integral power-of-2 operations (std::has_single_bit, std::bit_ceil, std::bit_floor, std::bit_length) 202002L<bit>(C++20)
__cpp_lib_integer_comparison_functionsInteger comparison functions202002L<utility>(C++20)
__cpp_lib_integer_sequenceCompile-time integer sequences201304L<utility>(C++14)
__cpp_lib_integral_constant_callablestd::integral_constant201304L<type_traits>(C++14)
__cpp_lib_interpolatestd::lerp, std::midpoint201902L<cmath><numeric>(C++20)
__cpp_lib_invokestd::invoke201411L<functional>(C++17)
__cpp_lib_invoke_rstd::invoke_r202106L<functional>(C++23)
__cpp_lib_is_aggregatestd::is_aggregate201703L<type_traits>(C++17)
__cpp_lib_is_constant_evaluatedstd::is_constant_evaluated201811L<type_traits>(C++20)
__cpp_lib_is_finalstd::is_final201402L<type_traits>(C++14)
__cpp_lib_is_invocablestd::is_invocable, std::invoke_result201703L<type_traits>(C++17)
__cpp_lib_is_layout_compatiblestd::is_layout_compatible201907L<type_traits>(C++20)
__cpp_lib_is_nothrow_convertiblestd::is_nothrow_convertible201806L<type_traits>(C++20)
__cpp_lib_is_null_pointerstd::is_null_pointer201309L<type_traits>(C++14)
__cpp_lib_is_pointer_interconvertible Pointer-interconvertibility traits 201907L<type_traits>(C++20)
__cpp_lib_is_scoped_enumstd::is_scoped_enum202011L<type_traits>(C++23)
__cpp_lib_is_swappable[nothrow-]swappable traits201603L<type_traits>(C++17)
__cpp_lib_jthreadStop token and joining thread201911L<stop_token><thread>(C++20)
__cpp_lib_latchstd::latch201907L<latch>(C++20)
__cpp_lib_launder Core Issue 1776: Replacement of class objects containing reference members (std::launder) 201606L<new>(C++17)
__cpp_lib_list_remove_return_type Change the return type of the std::list::remove, std::list::remove_if and std::list::unique members of std::forward_list and std::list201806L<forward_list><list>(C++20)
__cpp_lib_logical_traitsLogical operator type traits201510L<type_traits>(C++17)
__cpp_lib_make_from_tuplestd::make_from_tuple()201606L<tuple>(C++17)
__cpp_lib_make_reverse_iteratorstd::make_reverse_iterator201402L<iterator>(C++14)
__cpp_lib_make_uniquestd::make_unique201304L<memory>(C++14)
__cpp_lib_map_try_emplacestd::map::try_emplace, std::map::insert_or_assign201411L<map>(C++17)
__cpp_lib_math_constantsMathematical constants201907L<numbers>(C++20)
__cpp_lib_math_special_functionsMathematical special functions for C++17201603L<cmath>(C++17)
__cpp_lib_memory_resourcestd::pmr::memory_resource201603L<memory_resource>(C++17)
__cpp_lib_monadic_optional Monadic Operations in std::optional202110L<optional>(C++23)
__cpp_lib_move_only_functionstd::move_only_function202110L<functional>(C++23)
__cpp_lib_node_extract Splicing maps and sets (std::map::extract, std::map::merge, std::map::insert(node_type), etc) 201606L<map><set><unordered_map><unordered_set>(C++17)
__cpp_lib_nonmember_container_accessstd::size(), std::data() and std::empty()201411L<iterator><array><deque><forward_list><list><map><regex><set><string><unordered_map><unordered_set><vector>(C++17)
__cpp_lib_not_fnstd::not_fn()201603L<functional>(C++17)
__cpp_lib_null_iterators Null LegacyForwardIterators201304L<iterator>(C++14)
__cpp_lib_optionalstd::optional201606L<optional>(C++17)
Fully constexprstd::optional202106L<optional>(C++23)
__cpp_lib_out_ptrstd::out_ptr, std::inout_ptr202106L<memory>(C++23)
__cpp_lib_parallel_algorithmParallel algorithms201603L<algorithm><numeric>(C++17)
__cpp_lib_polymorphic_allocatorstd::pmr::polymorphic_allocator as a vocabulary type 201902L<memory_resource>(C++20)
__cpp_lib_quoted_string_iostd::quoted201304L<iomanip>(C++14)
__cpp_lib_rangesRanges library and constrained algorithms201911L<algorithm><functional><iterator><memory><ranges>(C++20)
Non-default-initializableviews202106L(C++23)
Views with ownership202110L(C++23)
__cpp_lib_ranges_starts_ends_withstd::ranges::starts_with, std::ranges::ends_with202106L<algorithm>(C++23)
__cpp_lib_ranges_zipstd::ranges::zip_view, std::ranges::zip_transform_view, std::ranges::adjacent_view, std::ranges::adjacent_transform_view202110L<ranges><tuple><utility>(C++23)
__cpp_lib_raw_memory_algorithmsExtending memory management tools201606L<memory>(C++17)
__cpp_lib_remove_cvrefstd::remove_cvref201711L<type_traits>(C++20)
__cpp_lib_result_of_sfinaestd::result_of and SFINAE201210L<type_traits><functional>(C++14)
__cpp_lib_robust_nonmodifying_seq_ops Making non-modifying sequence operations more robust (two-range overloads for std::mismatch, std::equal and std::is_permutation) 201304L<algorithm>(C++14)
__cpp_lib_samplestd::sample201603L<algorithm>(C++17)
__cpp_lib_scoped_lockstd::scoped_lock201703L<mutex>(C++17)
__cpp_lib_semaphorestd::counting_semaphore, std::binary_semaphore201907L<semaphore>(C++20)
__cpp_lib_shared_mutexstd::shared_mutex (untimed) 201505L<shared_mutex>(C++17)
__cpp_lib_shared_ptr_arraysstd::shared_ptr201611L<memory>(C++17)
Array support of std::make_shared201707L<memory>(C++20)
__cpp_lib_shared_ptr_weak_typeshared_ptr::weak_type201606L<memory>(C++17)
__cpp_lib_shared_timed_mutexstd::shared_timed_mutex201402L<shared_mutex>(C++14)
__cpp_lib_shiftstd::shift_left and std::shift_right201806L<algorithm>(C++20)
__cpp_lib_smart_ptr_for_overwrite Smart pointer creation with default initialization (std::allocate_shared_for_overwrite, std::make_shared_for_overwrite, std::make_unique_for_overwrite) 202002L<memory>(C++20)
__cpp_lib_source_location Source-code information capture (std::source_location) 201907L<source_location>(C++20)
__cpp_lib_spanstd::span202002L<span>(C++20)
__cpp_lib_spanstreamstd::spanbuf, std::spanstream202106L<spanstream>(C++23)
__cpp_lib_ssizestd::ssize and unsigned std::span::size201902L<iterator>(C++20)
__cpp_lib_stacktraceStacktrace library202011L<stacktrace>(C++23)
__cpp_lib_starts_ends_with String prefix and suffix checking (std::string_view::starts_with and std::string_view::ends_with for std::string and std::string_view) 201711L<string><string_view>(C++20)
__cpp_lib_stdatomic_h Compatibility header for C atomic operations 202011L<stdatomic.h>(C++23)
__cpp_lib_string_containscontains functions of std::basic_string and std::basic_string_view202011L<string><string_view>(C++23)
__cpp_lib_string_resize_and_overwritestd::basic_string::resize_and_overwrite202110L<string>(C++23)
__cpp_lib_string_udlsUser-defined literals for string types201304L<string>(C++14)
__cpp_lib_string_viewstd::string_view201606L<string><string_view>(C++17)
ConstexprIterator201803L<string><string_view>(C++20)
__cpp_lib_syncbuf Synchronized buffered ostream (std::syncbuf, std::osyncstream) and manipulators 201803L<syncstream>(C++20)
__cpp_lib_three_way_comparisonThree-way comparison (library support); adding three-way comparison to the library 201907L<compare>(C++20)
__cpp_lib_to_address Utility to convert a pointer to a raw pointer (std::to_address) 201711L<memory>(C++20)
__cpp_lib_to_arraystd::to_array201907L<array>(C++20)
__cpp_lib_to_chars Elementary string conversions (std::to_chars, std::from_chars) 201611L<charconv>(C++17)
__cpp_lib_to_underlyingstd::to_underlying202102L<utility>(C++23)
__cpp_lib_transformation_trait_aliases Alias templates for TransformationTraits 201304L<type_traits>(C++14)
__cpp_lib_transparent_operators Transparent operator functors (std::less<> et al) 201210L<functional>(C++14)
Transparent std::owner_less (std::owner_less<void>) 201510L<memory><functional>(C++17)
__cpp_lib_tuple_element_tstd::tuple_element_t201402L<tuple>(C++14)
__cpp_lib_tuples_by_typeAddressing tuples by type201304L<tuple><utility>(C++14)
__cpp_lib_type_identitystd::type_identity201806L<type_traits>(C++20)
__cpp_lib_type_trait_variable_templates Type traits variable templates (std::is_void_v, etc) 201510L<type_traits>(C++17)
__cpp_lib_uncaught_exceptionsstd::uncaught_exceptions201411L<exception>(C++17)
__cpp_lib_unordered_map_try_emplacestd::unordered_map::try_emplace, std::unordered_map::insert_or_assign201411L<unordered_map>(C++17)
__cpp_lib_unwrap_refstd::unwrap_ref_decay and std::unwrap_reference201811L<type_traits>(C++20)
__cpp_lib_variantstd::variant: a type-safe union for C++17 201606L<variant>(C++17)
std::visit for classes derived from std::variant202102L<variant>(C++23)
Fully constexprstd::variant202106L<variant>(C++23)
__cpp_lib_void_tstd::void_t201411L<type_traits>(C++17)

[편집]Example

[편집]Normal usage

#ifdef __has_include // Check if __has_include is present# if __has_include(<optional>) // Check for a standard library# include <optional># elif __has_include(<experimental/optional>) // Check for an experimental version# include <experimental/optional># elif __has_include(<boost/optional.hpp>) // Try with an external library# include <boost/optional.hpp># else // Not found at all# error "Missing <optional>"# endif#endif   #ifdef __has_cpp_attribute // Check if __has_cpp_attribute is present# if __has_cpp_attribute(deprecated) // Check for an attribute# define DEPRECATED(msg) [[deprecated(msg)]]# endif#endif#ifndef DEPRECATED# define DEPRECATED(msg)#endif   DEPRECATED("foo() has been deprecated")void foo();   #if __cpp_constexpr >= 201304 // Check for a specific version of a feature# define CONSTEXPR constexpr#else# define CONSTEXPR inline#endif   CONSTEXPR int bar(unsigned i){#if __cpp_binary_literals // Check for the presence of a featureunsigned mask1 =0b11000000;unsigned mask2 =0b00000111;#elseunsigned mask1 =0xC0;unsigned mask2 =0x07;#endifif( i & mask1 )return1;if( i & mask2 )return2;return0;}   int main(){}

[편집]Compiler Features Dump

The following program dumps C++ compiler features and attributes.

#if __cplusplus < 201100# error "C++11 or better is required"#endif   #include <algorithm>#include <cstring>#include <iomanip>#include <iostream>#include <string>   #ifdef __has_include# if __has_include(<version>)# include <version># endif#endif   #define COMPILER_FEATURE_VALUE(value) #value#define COMPILER_FEATURE_ENTRY(name) { #name, COMPILER_FEATURE_VALUE(name) },   #ifdef __has_cpp_attribute# define COMPILER_ATTRIBUTE_VALUE_AS_STRING(s) #s# define COMPILER_ATTRIBUTE_AS_NUMBER(x) COMPILER_ATTRIBUTE_VALUE_AS_STRING(x)# define COMPILER_ATTRIBUTE_ENTRY(attr) \ { #attr, COMPILER_ATTRIBUTE_AS_NUMBER(__has_cpp_attribute(attr)) },#else# define COMPILER_ATTRIBUTE_ENTRY(attr) { #attr, "_" },#endif   // Change these options to print out only necessary info.staticstruct PrintOptions {constexprstaticbool titles =1;constexprstaticbool attributes =1;constexprstaticbool general_features =1;constexprstaticbool core_features =1;constexprstaticbool lib_features =1;constexprstaticbool supported_features =1;constexprstaticbool unsupported_features =1;constexprstaticbool sorted_by_value =0;constexprstaticbool cxx11 =1;constexprstaticbool cxx14 =1;constexprstaticbool cxx17 =1;constexprstaticbool cxx20 =1;constexprstaticbool cxx23 =1;} print;   struct CompilerFeature { CompilerFeature(constchar* name = nullptr, constchar* value = nullptr): name(name), value(value){}constchar* name;constchar* value;};   static CompilerFeature cxx[]={ COMPILER_FEATURE_ENTRY(__cplusplus) COMPILER_FEATURE_ENTRY(__cpp_exceptions) COMPILER_FEATURE_ENTRY(__cpp_rtti)#if 0 COMPILER_FEATURE_ENTRY(__GNUC__) COMPILER_FEATURE_ENTRY(__GNUC_MINOR__) COMPILER_FEATURE_ENTRY(__GNUC_PATCHLEVEL__) COMPILER_FEATURE_ENTRY(__GNUG__) COMPILER_FEATURE_ENTRY(__clang__) COMPILER_FEATURE_ENTRY(__clang_major__) COMPILER_FEATURE_ENTRY(__clang_minor__) COMPILER_FEATURE_ENTRY(__clang_patchlevel__)#endif};static CompilerFeature cxx11[]={ COMPILER_FEATURE_ENTRY(__cpp_alias_templates) COMPILER_FEATURE_ENTRY(__cpp_attributes) COMPILER_FEATURE_ENTRY(__cpp_constexpr) COMPILER_FEATURE_ENTRY(__cpp_decltype) COMPILER_FEATURE_ENTRY(__cpp_delegating_constructors) COMPILER_FEATURE_ENTRY(__cpp_inheriting_constructors) COMPILER_FEATURE_ENTRY(__cpp_initializer_lists) COMPILER_FEATURE_ENTRY(__cpp_lambdas) COMPILER_FEATURE_ENTRY(__cpp_nsdmi) COMPILER_FEATURE_ENTRY(__cpp_range_based_for) COMPILER_FEATURE_ENTRY(__cpp_raw_strings) COMPILER_FEATURE_ENTRY(__cpp_ref_qualifiers) COMPILER_FEATURE_ENTRY(__cpp_rvalue_references) COMPILER_FEATURE_ENTRY(__cpp_static_assert) COMPILER_FEATURE_ENTRY(__cpp_threadsafe_static_init) COMPILER_FEATURE_ENTRY(__cpp_unicode_characters) COMPILER_FEATURE_ENTRY(__cpp_unicode_literals) COMPILER_FEATURE_ENTRY(__cpp_user_defined_literals) COMPILER_FEATURE_ENTRY(__cpp_variadic_templates)};static CompilerFeature cxx14[]={ COMPILER_FEATURE_ENTRY(__cpp_aggregate_nsdmi) COMPILER_FEATURE_ENTRY(__cpp_binary_literals) COMPILER_FEATURE_ENTRY(__cpp_constexpr) COMPILER_FEATURE_ENTRY(__cpp_decltype_auto) COMPILER_FEATURE_ENTRY(__cpp_generic_lambdas) COMPILER_FEATURE_ENTRY(__cpp_init_captures) COMPILER_FEATURE_ENTRY(__cpp_return_type_deduction) COMPILER_FEATURE_ENTRY(__cpp_sized_deallocation) COMPILER_FEATURE_ENTRY(__cpp_variable_templates)};static CompilerFeature cxx14lib[]={ COMPILER_FEATURE_ENTRY(__cpp_lib_chrono_udls) COMPILER_FEATURE_ENTRY(__cpp_lib_complex_udls) COMPILER_FEATURE_ENTRY(__cpp_lib_exchange_function) COMPILER_FEATURE_ENTRY(__cpp_lib_generic_associative_lookup) COMPILER_FEATURE_ENTRY(__cpp_lib_integer_sequence) COMPILER_FEATURE_ENTRY(__cpp_lib_integral_constant_callable) COMPILER_FEATURE_ENTRY(__cpp_lib_is_final) COMPILER_FEATURE_ENTRY(__cpp_lib_is_null_pointer) COMPILER_FEATURE_ENTRY(__cpp_lib_make_reverse_iterator) COMPILER_FEATURE_ENTRY(__cpp_lib_make_unique) COMPILER_FEATURE_ENTRY(__cpp_lib_null_iterators) COMPILER_FEATURE_ENTRY(__cpp_lib_quoted_string_io) COMPILER_FEATURE_ENTRY(__cpp_lib_result_of_sfinae) COMPILER_FEATURE_ENTRY(__cpp_lib_robust_nonmodifying_seq_ops) COMPILER_FEATURE_ENTRY(__cpp_lib_shared_timed_mutex) COMPILER_FEATURE_ENTRY(__cpp_lib_string_udls) COMPILER_FEATURE_ENTRY(__cpp_lib_transformation_trait_aliases) COMPILER_FEATURE_ENTRY(__cpp_lib_transparent_operators) COMPILER_FEATURE_ENTRY(__cpp_lib_tuple_element_t) COMPILER_FEATURE_ENTRY(__cpp_lib_tuples_by_type)};   static CompilerFeature cxx17[]={ COMPILER_FEATURE_ENTRY(__cpp_aggregate_bases) COMPILER_FEATURE_ENTRY(__cpp_aligned_new) COMPILER_FEATURE_ENTRY(__cpp_capture_star_this) COMPILER_FEATURE_ENTRY(__cpp_constexpr) COMPILER_FEATURE_ENTRY(__cpp_deduction_guides) COMPILER_FEATURE_ENTRY(__cpp_enumerator_attributes) COMPILER_FEATURE_ENTRY(__cpp_fold_expressions) COMPILER_FEATURE_ENTRY(__cpp_guaranteed_copy_elision) COMPILER_FEATURE_ENTRY(__cpp_hex_float) COMPILER_FEATURE_ENTRY(__cpp_if_constexpr) COMPILER_FEATURE_ENTRY(__cpp_inheriting_constructors) COMPILER_FEATURE_ENTRY(__cpp_inline_variables) COMPILER_FEATURE_ENTRY(__cpp_namespace_attributes) COMPILER_FEATURE_ENTRY(__cpp_noexcept_function_type) COMPILER_FEATURE_ENTRY(__cpp_nontype_template_args) COMPILER_FEATURE_ENTRY(__cpp_nontype_template_parameter_auto) COMPILER_FEATURE_ENTRY(__cpp_range_based_for) COMPILER_FEATURE_ENTRY(__cpp_static_assert) COMPILER_FEATURE_ENTRY(__cpp_structured_bindings) COMPILER_FEATURE_ENTRY(__cpp_template_template_args) COMPILER_FEATURE_ENTRY(__cpp_variadic_using)};static CompilerFeature cxx17lib[]={ COMPILER_FEATURE_ENTRY(__cpp_lib_addressof_constexpr) COMPILER_FEATURE_ENTRY(__cpp_lib_allocator_traits_is_always_equal) COMPILER_FEATURE_ENTRY(__cpp_lib_any) COMPILER_FEATURE_ENTRY(__cpp_lib_apply) COMPILER_FEATURE_ENTRY(__cpp_lib_array_constexpr) COMPILER_FEATURE_ENTRY(__cpp_lib_as_const) COMPILER_FEATURE_ENTRY(__cpp_lib_atomic_is_always_lock_free) COMPILER_FEATURE_ENTRY(__cpp_lib_bool_constant) COMPILER_FEATURE_ENTRY(__cpp_lib_boyer_moore_searcher) COMPILER_FEATURE_ENTRY(__cpp_lib_byte) COMPILER_FEATURE_ENTRY(__cpp_lib_chrono) COMPILER_FEATURE_ENTRY(__cpp_lib_clamp) COMPILER_FEATURE_ENTRY(__cpp_lib_enable_shared_from_this) COMPILER_FEATURE_ENTRY(__cpp_lib_execution) COMPILER_FEATURE_ENTRY(__cpp_lib_filesystem) COMPILER_FEATURE_ENTRY(__cpp_lib_gcd_lcm) COMPILER_FEATURE_ENTRY(__cpp_lib_hardware_interference_size) COMPILER_FEATURE_ENTRY(__cpp_lib_has_unique_object_representations) COMPILER_FEATURE_ENTRY(__cpp_lib_hypot) COMPILER_FEATURE_ENTRY(__cpp_lib_incomplete_container_elements) COMPILER_FEATURE_ENTRY(__cpp_lib_invoke) COMPILER_FEATURE_ENTRY(__cpp_lib_is_aggregate) COMPILER_FEATURE_ENTRY(__cpp_lib_is_invocable) COMPILER_FEATURE_ENTRY(__cpp_lib_is_swappable) COMPILER_FEATURE_ENTRY(__cpp_lib_launder) COMPILER_FEATURE_ENTRY(__cpp_lib_logical_traits) COMPILER_FEATURE_ENTRY(__cpp_lib_make_from_tuple) COMPILER_FEATURE_ENTRY(__cpp_lib_map_try_emplace) COMPILER_FEATURE_ENTRY(__cpp_lib_math_special_functions) COMPILER_FEATURE_ENTRY(__cpp_lib_memory_resource) COMPILER_FEATURE_ENTRY(__cpp_lib_node_extract) COMPILER_FEATURE_ENTRY(__cpp_lib_nonmember_container_access) COMPILER_FEATURE_ENTRY(__cpp_lib_not_fn) COMPILER_FEATURE_ENTRY(__cpp_lib_optional) COMPILER_FEATURE_ENTRY(__cpp_lib_parallel_algorithm) COMPILER_FEATURE_ENTRY(__cpp_lib_raw_memory_algorithms) COMPILER_FEATURE_ENTRY(__cpp_lib_sample) COMPILER_FEATURE_ENTRY(__cpp_lib_scoped_lock) COMPILER_FEATURE_ENTRY(__cpp_lib_shared_mutex) COMPILER_FEATURE_ENTRY(__cpp_lib_shared_ptr_arrays) COMPILER_FEATURE_ENTRY(__cpp_lib_shared_ptr_weak_type) COMPILER_FEATURE_ENTRY(__cpp_lib_string_view) COMPILER_FEATURE_ENTRY(__cpp_lib_to_chars) COMPILER_FEATURE_ENTRY(__cpp_lib_transparent_operators) COMPILER_FEATURE_ENTRY(__cpp_lib_type_trait_variable_templates) COMPILER_FEATURE_ENTRY(__cpp_lib_uncaught_exceptions) COMPILER_FEATURE_ENTRY(__cpp_lib_unordered_map_try_emplace) COMPILER_FEATURE_ENTRY(__cpp_lib_variant) COMPILER_FEATURE_ENTRY(__cpp_lib_void_t)};   static CompilerFeature cxx20[]={ COMPILER_FEATURE_ENTRY(__cpp_aggregate_paren_init) COMPILER_FEATURE_ENTRY(__cpp_char8_t) COMPILER_FEATURE_ENTRY(__cpp_concepts) COMPILER_FEATURE_ENTRY(__cpp_conditional_explicit) COMPILER_FEATURE_ENTRY(__cpp_consteval) COMPILER_FEATURE_ENTRY(__cpp_constexpr) COMPILER_FEATURE_ENTRY(__cpp_constexpr_dynamic_alloc) COMPILER_FEATURE_ENTRY(__cpp_constexpr_in_decltype) COMPILER_FEATURE_ENTRY(__cpp_constinit) COMPILER_FEATURE_ENTRY(__cpp_deduction_guides) COMPILER_FEATURE_ENTRY(__cpp_designated_initializers) COMPILER_FEATURE_ENTRY(__cpp_generic_lambdas) COMPILER_FEATURE_ENTRY(__cpp_impl_coroutine) COMPILER_FEATURE_ENTRY(__cpp_impl_destroying_delete) COMPILER_FEATURE_ENTRY(__cpp_impl_three_way_comparison) COMPILER_FEATURE_ENTRY(__cpp_init_captures) COMPILER_FEATURE_ENTRY(__cpp_modules) COMPILER_FEATURE_ENTRY(__cpp_nontype_template_args) COMPILER_FEATURE_ENTRY(__cpp_using_enum)};static CompilerFeature cxx20lib[]={ COMPILER_FEATURE_ENTRY(__cpp_lib_array_constexpr) COMPILER_FEATURE_ENTRY(__cpp_lib_assume_aligned) COMPILER_FEATURE_ENTRY(__cpp_lib_atomic_flag_test) COMPILER_FEATURE_ENTRY(__cpp_lib_atomic_float) COMPILER_FEATURE_ENTRY(__cpp_lib_atomic_lock_free_type_aliases) COMPILER_FEATURE_ENTRY(__cpp_lib_atomic_ref) COMPILER_FEATURE_ENTRY(__cpp_lib_atomic_shared_ptr) COMPILER_FEATURE_ENTRY(__cpp_lib_atomic_value_initialization) COMPILER_FEATURE_ENTRY(__cpp_lib_atomic_wait) COMPILER_FEATURE_ENTRY(__cpp_lib_barrier) COMPILER_FEATURE_ENTRY(__cpp_lib_bind_front) COMPILER_FEATURE_ENTRY(__cpp_lib_bit_cast) COMPILER_FEATURE_ENTRY(__cpp_lib_bitops) COMPILER_FEATURE_ENTRY(__cpp_lib_bounded_array_traits) COMPILER_FEATURE_ENTRY(__cpp_lib_char8_t) COMPILER_FEATURE_ENTRY(__cpp_lib_chrono) COMPILER_FEATURE_ENTRY(__cpp_lib_concepts) COMPILER_FEATURE_ENTRY(__cpp_lib_constexpr_algorithms) COMPILER_FEATURE_ENTRY(__cpp_lib_constexpr_complex) COMPILER_FEATURE_ENTRY(__cpp_lib_constexpr_dynamic_alloc) COMPILER_FEATURE_ENTRY(__cpp_lib_constexpr_functional) COMPILER_FEATURE_ENTRY(__cpp_lib_constexpr_iterator) COMPILER_FEATURE_ENTRY(__cpp_lib_constexpr_memory) COMPILER_FEATURE_ENTRY(__cpp_lib_constexpr_numeric) COMPILER_FEATURE_ENTRY(__cpp_lib_constexpr_string) COMPILER_FEATURE_ENTRY(__cpp_lib_constexpr_string_view) COMPILER_FEATURE_ENTRY(__cpp_lib_constexpr_tuple) COMPILER_FEATURE_ENTRY(__cpp_lib_constexpr_utility) COMPILER_FEATURE_ENTRY(__cpp_lib_constexpr_vector) COMPILER_FEATURE_ENTRY(__cpp_lib_coroutine) COMPILER_FEATURE_ENTRY(__cpp_lib_destroying_delete) COMPILER_FEATURE_ENTRY(__cpp_lib_endian) COMPILER_FEATURE_ENTRY(__cpp_lib_erase_if) COMPILER_FEATURE_ENTRY(__cpp_lib_execution) COMPILER_FEATURE_ENTRY(__cpp_lib_format) COMPILER_FEATURE_ENTRY(__cpp_lib_generic_unordered_lookup) COMPILER_FEATURE_ENTRY(__cpp_lib_int_pow2) COMPILER_FEATURE_ENTRY(__cpp_lib_integer_comparison_functions) COMPILER_FEATURE_ENTRY(__cpp_lib_interpolate) COMPILER_FEATURE_ENTRY(__cpp_lib_is_constant_evaluated) COMPILER_FEATURE_ENTRY(__cpp_lib_is_layout_compatible) COMPILER_FEATURE_ENTRY(__cpp_lib_is_nothrow_convertible) COMPILER_FEATURE_ENTRY(__cpp_lib_is_pointer_interconvertible) COMPILER_FEATURE_ENTRY(__cpp_lib_jthread) COMPILER_FEATURE_ENTRY(__cpp_lib_latch) COMPILER_FEATURE_ENTRY(__cpp_lib_list_remove_return_type) COMPILER_FEATURE_ENTRY(__cpp_lib_math_constants) COMPILER_FEATURE_ENTRY(__cpp_lib_polymorphic_allocator) COMPILER_FEATURE_ENTRY(__cpp_lib_ranges) COMPILER_FEATURE_ENTRY(__cpp_lib_remove_cvref) COMPILER_FEATURE_ENTRY(__cpp_lib_semaphore) COMPILER_FEATURE_ENTRY(__cpp_lib_shared_ptr_arrays) COMPILER_FEATURE_ENTRY(__cpp_lib_shift) COMPILER_FEATURE_ENTRY(__cpp_lib_smart_ptr_for_overwrite) COMPILER_FEATURE_ENTRY(__cpp_lib_source_location) COMPILER_FEATURE_ENTRY(__cpp_lib_span) COMPILER_FEATURE_ENTRY(__cpp_lib_ssize) COMPILER_FEATURE_ENTRY(__cpp_lib_starts_ends_with) COMPILER_FEATURE_ENTRY(__cpp_lib_string_view) COMPILER_FEATURE_ENTRY(__cpp_lib_syncbuf) COMPILER_FEATURE_ENTRY(__cpp_lib_three_way_comparison) COMPILER_FEATURE_ENTRY(__cpp_lib_to_address) COMPILER_FEATURE_ENTRY(__cpp_lib_to_array) COMPILER_FEATURE_ENTRY(__cpp_lib_type_identity) COMPILER_FEATURE_ENTRY(__cpp_lib_unwrap_ref)};   static CompilerFeature cxx23[]={//< Continue to Populate COMPILER_FEATURE_ENTRY(__cpp_constexpr) COMPILER_FEATURE_ENTRY(__cpp_explicit_this_parameter) COMPILER_FEATURE_ENTRY(__cpp_if_consteval) COMPILER_FEATURE_ENTRY(__cpp_multidimensional_subscript) COMPILER_FEATURE_ENTRY(__cpp_size_t_suffix)};static CompilerFeature cxx23lib[]={//< Continue to Populate COMPILER_FEATURE_ENTRY(__cpp_lib_adaptor_iterator_pair_constructor) COMPILER_FEATURE_ENTRY(__cpp_lib_allocate_at_least) COMPILER_FEATURE_ENTRY(__cpp_lib_associative_heterogeneous_erasure) COMPILER_FEATURE_ENTRY(__cpp_lib_byteswap) COMPILER_FEATURE_ENTRY(__cpp_lib_constexpr_typeinfo) COMPILER_FEATURE_ENTRY(__cpp_lib_format) COMPILER_FEATURE_ENTRY(__cpp_lib_invoke_r) COMPILER_FEATURE_ENTRY(__cpp_lib_is_scoped_enum) COMPILER_FEATURE_ENTRY(__cpp_lib_monadic_optional) COMPILER_FEATURE_ENTRY(__cpp_lib_move_only_function) COMPILER_FEATURE_ENTRY(__cpp_lib_optional) COMPILER_FEATURE_ENTRY(__cpp_lib_out_ptr) COMPILER_FEATURE_ENTRY(__cpp_lib_ranges) COMPILER_FEATURE_ENTRY(__cpp_lib_ranges_starts_ends_with) COMPILER_FEATURE_ENTRY(__cpp_lib_ranges_zip) COMPILER_FEATURE_ENTRY(__cpp_lib_spanstream) COMPILER_FEATURE_ENTRY(__cpp_lib_stacktrace) COMPILER_FEATURE_ENTRY(__cpp_lib_stdatomic_h) COMPILER_FEATURE_ENTRY(__cpp_lib_string_contains) COMPILER_FEATURE_ENTRY(__cpp_lib_string_resize_and_overwrite) COMPILER_FEATURE_ENTRY(__cpp_lib_to_underlying) COMPILER_FEATURE_ENTRY(__cpp_lib_variant)};   static CompilerFeature attributes[]={ COMPILER_ATTRIBUTE_ENTRY(carries_dependency) COMPILER_ATTRIBUTE_ENTRY(deprecated) COMPILER_ATTRIBUTE_ENTRY(fallthrough) COMPILER_ATTRIBUTE_ENTRY(likely) COMPILER_ATTRIBUTE_ENTRY(maybe_unused) COMPILER_ATTRIBUTE_ENTRY(nodiscard) COMPILER_ATTRIBUTE_ENTRY(noreturn) COMPILER_ATTRIBUTE_ENTRY(no_unique_address) COMPILER_ATTRIBUTE_ENTRY(unlikely)};   constexprbool is_feature_supported(const CompilerFeature& x){return x.value[0]!='_'&& x.value[0]!='0';}   inlinevoid print_compiler_feature(const CompilerFeature& x){constexprstaticint max_name_length =44;//< Update if necessarystd::string value{ is_feature_supported(x)? x.value:"------"};if(value.back()=='L') value.pop_back();//~ 201603L -> 201603// value.insert(4, 1, '-'); //~ 201603 -> 2016-03if((print.supported_features&& is_feature_supported(x)) or (print.unsupported_features&&!is_feature_supported(x))){std::cout<<std::left<<std::setw(max_name_length)<< x.name<<" "<< value <<'\n';}}   template<size_t N>inlinevoid show(charconst* title, CompilerFeature (&features)[N]){if(print.titles){std::cout<<'\n'<<std::left<< title <<'\n';}if(print.sorted_by_value){std::sort(std::begin(features), std::end(features), [](CompilerFeature const& lhs, CompilerFeature const& rhs){returnstd::strcmp(lhs.value, rhs.value)<0;});}for(const CompilerFeature& x : features){ print_compiler_feature(x);}}   int main(){if(print.general_features) show("C++ GENERAL", cxx);if(print.cxx11&& print.core_features) show("C++11 CORE", cxx11);if(print.cxx14&& print.core_features) show("C++14 CORE", cxx14);if(print.cxx14&& print.lib_features) show("C++14 LIB" , cxx14lib);if(print.cxx17&& print.core_features) show("C++17 CORE", cxx17);if(print.cxx17&& print.lib_features) show("C++17 LIB" , cxx17lib);if(print.cxx20&& print.core_features) show("C++20 CORE", cxx20);if(print.cxx20&& print.lib_features) show("C++20 LIB" , cxx20lib);if(print.cxx23&& print.core_features) show("C++23 CORE", cxx23);if(print.cxx23&& print.lib_features) show("C++23 LIB" , cxx23lib);if(print.attributes) show("ATTRIBUTES", attributes);}

Possible output:

C++ GENERAL __cplusplus 202002 __cpp_exceptions 199711 __cpp_rtti 199711   C++11 CORE __cpp_alias_templates 200704 __cpp_attributes 200809 __cpp_constexpr 201907 __cpp_decltype 200707 __cpp_delegating_constructors 200604 __cpp_inheriting_constructors 201511 __cpp_initializer_lists 200806 __cpp_lambdas 200907 __cpp_nsdmi 200809 __cpp_range_based_for 201603 __cpp_raw_strings 200710 __cpp_ref_qualifiers 200710 __cpp_rvalue_references 200610 __cpp_static_assert 201411 __cpp_threadsafe_static_init 200806 __cpp_unicode_characters 200704 __cpp_unicode_literals 200710 __cpp_user_defined_literals 200809 __cpp_variadic_templates 200704   C++14 CORE __cpp_aggregate_nsdmi 201304 __cpp_binary_literals 201304 __cpp_constexpr 201907 __cpp_decltype_auto 201304 __cpp_generic_lambdas 201707 __cpp_init_captures 201803 __cpp_return_type_deduction 201304 __cpp_sized_deallocation ------ __cpp_variable_templates 201304   ... truncated ...

[편집]더 보기

Library feature-test macros(C++20) defined in the header <version>
C++ documentation for Macro Symbol Index

[편집]외부 연결

The official document on Feature Test Recommendations
Source code to dump compiler features
close