C++ 2017ISO C++2017
In this implementation the -std=gnu++17 or
-std=c++17 flag must be used to enable language
and library
features. See dialect
options. The pre-defined symbol
__cplusplus is used to check for the
presence of the required flag.
GCC 9.1 was the first release with non-experimental C++17 support,
so the API and ABI of features added in C++17 is only stable
since that release.
This section describes the C++17 and library TS support in
the GCC 13 release series, not in any particular release.
The following table lists new library features that are included in
the C++17 standard. The "Proposal" column provides a link to the
ISO C++ committee proposal that describes the feature, while the "Status"
column indicates the first version of GCC that contains an implementation of
this feature (if it has been implemented).
The "SD-6 Feature Test" column shows the corresponding macro or header from
SD-6:
Feature-testing recommendations for C++.
C++ 2017 Library FeaturesLibrary FeatureProposalStatusSD-6 Feature Testconstexpr std::hardware_{constructive,destructive}_interference_size
P0154R1
12.1 __cpp_lib_hardware_interference_size >= 201603 Core Issue 1776: Replacement of class objects containing reference members
P0137R1
7.1 __cpp_lib_launder >= 201606Wording for std::uncaught_exceptions
N4259
6.1__cpp_lib_uncaught_exceptions >= 201411 C++17 should refer to C11 instead of C99
P0063R3
9.1 Variant: a type-safe union for C++17
P0088R3
7.1 __has_include(<variant>),
__cpp_lib_variant >= 201603
(since 7.3, see Note 1)
Library Fundamentals V1 TS Components: optional
P0220R1
7.1 __has_include(<optional>),
__cpp_lib_optional >= 201603
(since 7.3, see Note 1)
Library Fundamentals V1 TS Components: any
P0220R1
7.1 __has_include(<any>),
__cpp_lib_any >= 201603
(since 7.3, see Note 1)
Library Fundamentals V1 TS Components: string_view
P0220R1
7.1 __has_include(<string_view>),
__cpp_lib_string_view >= 201603
(since 7.3, see Note 1)
Library Fundamentals V1 TS Components: memory_resource
P0220R1
9.1 __has_include(<memory_resource>),
__cpp_lib_memory_resource >= 201603 Library Fundamentals V1 TS Components: apply
P0220R1
7.1 __cpp_lib_apply >= 201603 Library Fundamentals V1 TS Components: shared_ptr<T[]>
P0220R1
7.1 __cpp_lib_shared_ptr_arrays >= 201603 Library Fundamentals V1 TS Components: Searchers
P0220R1
7.1 __cpp_lib_boyer_moore_searcher >= 201603 Library Fundamentals V1 TS Components: Sampling
P0220R1
7.1 __cpp_lib_sample >= 201603 Constant View: A proposal for a std::as_const helper function template
P0007R1
7.1 __cpp_lib_as_const >= 201510 Improving pair and tuple
N4387
6.1 N/A make_from_tuple: apply for construction
P0209R2
7.1 __cpp_lib_make_from_tuple >= 201606
Removing auto_ptr, random_shuffle(),
And Old <functional> Stuff
N4190
No (kept for backwards compatibility) Deprecating Vestigial Library Parts in C++17
P0174R2
12.1 Making std::owner_less more flexible
P0074R0
7.1 __cpp_lib_transparent_operators >= 201510 std::addressof should be constexpr
LWG2296
7.1 __cpp_lib_addressof_constexpr >= 201603 Safe conversions in unique_ptr<T[]>
N4089
6 LWG 2228: Missing SFINAE rule in unique_ptr templated assignment
N4366
6 Re-enabling shared_from_this
P0033R1
7.1 __cpp_lib_enable_shared_from_this >= 201603 A proposal to add invoke function template
N4169
6.1 __cpp_lib_invoke >= 201411 TriviallyCopyable reference_wrapper
N4277
5.1 Adopt not_fn from Library Fundamentals 2 for C++17
P0005R4
7.1 __cpp_lib_not_fn >= 201603 Fixes for not_fn
P0358R1
7.1 Fixing a design mistake in the searchers interface in Library Fundamentals
P0253R1
7.1 Extending memory management tools
P0040R3
7.1 __cpp_lib_raw_memory_algorithms >= 201606Lshared_ptr::weak_type
P0163R0
7.1 __cpp_lib_shared_ptr_weak_type >= 201606Transformation Trait Alias void_t
N3911
6.1 __cpp_lib_void_t >= 201411 Wording for bool_constant, revision 1
N4389
6.1 __cpp_lib_bool_constant >= 201505 Adopt Type Traits Variable Templates from Library Fundamentals TS for C++17
P0006R0
7.1 __cpp_lib_type_trait_variable_templates >= 201510 Logical Operator Type Traits
P0013R1
6.1 __cpp_lib_logical_traits >= 201510 Adding [nothrow-]swappable traits
P0185R1
7.1 (__is_swappable available since 6.1) __cpp_lib_is_swappable >= 201603 is_callable, the missing INVOKE related trait
P0077R2
7.1 __cpp_lib_is_invocable >= 201703 has_unique_object_representations
P0258R2
7.1 __cpp_lib_has_unique_object_representations >= 201606 Polishing <chrono>
P0092R1
7.1 __cpp_lib_chrono >= 201510 Adding more constexpr to <chrono>
P0505R0
7.1 __cpp_lib_chrono >= 201611
(since 7.3, see Note 2)
Constexpr for std::char_traits
P0426R1
8.1 __cpp_lib_constexpr_string >= 201611 Integrating std::string_view and std::string
P0254R2
7.1 Give 'std::string' a non-const '.data()' member function
P0272R1
7.1 Cleaning-up noexcept in the Library
N4258
6.1 __cpp_lib_allocator_traits_is_always_equal >= 201411 Contiguous Iterators
N4284
N/A Minimal incomplete type support for standard containers
N4510
3.0 __cpp_lib_incomplete_container_elements >= 201505
(since 6.2, see Note 2)
Emplace return type
P0084R2
7.1 Improved insertion interface for unique-key maps
N4279
6.1 __cpp_lib_map_try_emplace >= 201411,
__cpp_lib_unordered_map_try_emplace >= 201411 Splicing Maps and Sets
P0083R3
7.1 __cpp_lib_node_extract >= 201606 Non-member size() and more
N4280
6.1 __cpp_lib_nonmember_container_access >= 201411 A Proposal to Add Constexpr Modifiers to reverse_iterator, move_iterator, array and Range Access
P0031R0
7.1 __cpp_lib_array_constexpr >= 201603 The Parallelism TS Should be Standardized
P0024R2
9.1 __has_include(<execution>),
__cpp_lib_execution >= 201603 ,
__cpp_lib_parallel_algorithm >= 201603
(requires linking with -ltbb, see Note 3)
An algorithm to "clamp" a value between a pair of boundary values
P0025R0
7.1 __cpp_lib_clamp >= 201603 Adopt Selected Library Fundamentals V2 Components for C++17
P0295R0
7.1 __cpp_lib_gcd_lcm >= 201606 Proposal to Introduce a 3-Argument Overload to std::hypot
P0030R1
7.1 __cpp_lib_hypot >= 201603 Mathematical Special Functions for C++17
P0226R1
7.1 __cpp_lib_math_special_functions >= 201603
(see Note 4)
Adopt the File System TS for C++17
P0218R1
8.1 __has_include(<filesystem>),
__cpp_lib_filesystem >= 201603
(GCC 8.x requires linking with -lstdc++fs)
Relative Paths for Filesystem
P0219R1
8.1 __cpp_lib_filesystem >= 201606 Adapting string_view by filesystem paths
P0392R0
8.1 __cpp_lib_filesystem >= 201606 Directory Entry Caching for Filesystem
P0317R1
8.1 __cpp_lib_filesystem >= 201703 constexpr atomic<T>::is_always_lock_free
P0152R1
7.1 __cpp_lib_atomic_is_always_lock_free >= 201603 A proposal to add shared_mutex (untimed) (Revision 4)
N4508
6.1 __cpp_lib_shared_mutex >= 201505 Variadic lock_guard (Rev. 5)
P0156R2
7.1 __cpp_lib_scoped_lock >= 201703 A byte type definition
P0298R3
7.1 __cpp_lib_byte >= 201603 (since 7.3, see Note 2)
Elementary string conversions
P0067R5
11.1 (integral types supported since 8.1) __has_include(<charconv>),
__cpp_lib_to_chars >= 201611 Homogeneous interface for variant, any and optional
P0032R3
7.1 __cpp_lib_any >= 201606 ,
__cpp_lib_optional >= 201606 ,
__cpp_lib_variant >= 201606 Making Optional Greater Equal Again
P0307R2
7.1 __cpp_lib_optional >= 201606
Note 1: This feature is supported in GCC 7.1 and 7.2 but before GCC 7.3 the
__cpp_lib macro is not defined, and compilation will fail if the
header is included without using to enable C++17 support.
Note 2: This feature is supported in older releases but the
__cpp_lib macro is not defined to the right value
(or not defined at all) until the version shown in parentheses.
Note 3: The Parallel Algorithms have an external dependency on Intel TBB 2018
or later. If the <execution>
header is included then -ltbb must be used to link to TBB.
Note 4: The mathematical special functions are enabled in C++17 mode from
GCC 7.1 onwards. For GCC 6.x or for C++11/C++14 define
__STDCPP_WANT_MATH_SPEC_FUNCS__ to a non-zero value
and test for __STDCPP_MATH_SPEC_FUNCS__ >= 201003L.
The following status table is based on the table of contents of
ISO/IEC 14882:2017.
Some subclauses are not shown in the table where the content is unchanged
since C++14 and the implementation is complete.
C++ 2017 Implementation StatusSectionDescriptionStatusComments21Language support21.1General21.2Common definitions21.3Implementation properties21.3.1General21.3.2Header <limits> synopsis21.3.3Floating-point type properties21.3.3.1float_round_styleN21.3.3.2float_denorm_styleN21.3.4Class template numeric_limitsY21.3.5Header <climits> synopsisY21.3.6Header <cfloat> synopsisY21.4Integer types21.4.1Header <cstdint> synopsisY21.5Start and terminationPartialC library dependency for quick_exit, at_quick_exit21.6Dynamic memory management21.6.1Header <new> synopsis21.6.2Storage allocation and deallocationY21.6.3Storage allocation errorsY21.6.4Pointer optimization barrierY21.6.5Hardware interference sizeY21.7Type identificationY21.8Exception handling21.8.1Header <exception> synopsis21.8.2Class exceptionY21.8.3Class bad_exceptionY21.8.4Abnormal terminationY21.8.5uncaught_exceptionsY21.8.6Exception PropagationY21.8.7nested_exceptionY21.9Initializer listsY21.10Other runtime supportY22Diagnostics22.1General22.2Exception classesY22.3AssertionsY22.4Error numbersY22.5System error support23General utilities23.1General23.2Utility components23.2.1Header <utility> synopsis23.2.2OperatorsY23.2.3swapY23.2.4exchangeY23.2.5Forward/move helpersY23.2.6Function template as_constY23.2.7Function template declvalY23.2.8Primitive numeric output conversionPartial23.2.9Primitive numeric input conversionPartial23.3Compile-time integer sequences23.4PairsY23.5TuplesY23.6Optional objectsY23.7VariantsY23.8Storage for any typeY23.9BitsetsY23.10MemoryY23.10.1In general23.10.2Header <memory> synopsisY23.10.3Pointer traitsY23.10.4Pointer safetyY23.10.5AlignY23.10.6Allocator argument tagY23.10.7uses_allocatorY23.10.8Allocator traitsY23.10.9The default allocatorY23.10.10Specialized algorithmsY23.10.11C library memory allocationY23.11Smart pointers23.11.1Class template unique_ptrY23.11.2Shared-ownership pointersY23.12Memory resources23.12.1Header <memory_resource> synopsisY23.12.2Class memory_resourceY23.12.3Class template polymorphic_allocatorY23.12.4Access to program-wide memory_resource objectsY23.12.5Pool resource classesY23.12.6Class monotonic_buffer_resourceY23.13Class template scoped_allocator_adaptorY23.14Function objects23.14.1Header <functional> synopsis23.14.2Definitions23.14.3Requirements23.14.4Function template invokeY23.14.5Class template reference_wrapperY23.14.6Arithmetic operationY23.14.7ComparisonsY23.14.8Logical operationsY23.14.9Bitwise operationsY23.14.10Function template not_fnY23.14.11Function object bindersY23.14.12Function template mem_fnY23.14.13Polymorphic function wrappersY23.14.14SearchersY23.14.15Class template hashY23.15Metaprogramming and type traits23.15.1Requirements23.15.2Header <type_traits> synopsisY23.15.3Helper classesY23.15.4Unary Type TraitsY23.15.5Type property queriesY23.15.6Relationships between typesY23.15.7Transformations between typesY23.15.8Logical operator traitsY23.16Compile-time rational arithmeticY23.17.1In general23.17.2Header <chrono> synopsis23.17Time utilities23.17.3Clock requirementsY23.17.4Time-related traitsY23.17.5Class template durationY23.17.6Class template time_pointY23.17.7ClocksY23.17.8Header <ctime> synopsisY23.18Class type_indexY23.19Execution policies23.19.1In general23.19.2Header <execution> synopsis23.19.3Execution policy type traitY23.19.4Sequenced execution policyY23.19.5Parallel execution policyY23.19.6Parallel and unsequenced execution policyY23.19.7Execution policy objectsY24Strings24.1General24.2Character traitsY24.3String classesY24.4String view classesY24.4.1Header <string_view> synopsisY24.4.2Class template basic_string_viewY24.4.3Non-member comparison functionsY24.4.4Inserters and extractorsY24.4.5Hash supportY24.4.6Suffix for basic_string_view literalsY24.5Null-terminated sequence utilitiesPartialC library dependency. 25Localization25.1GeneralY25.2Header <locale> synopsisY25.3LocalesY25.4Standard locale categoriesY25.5C Library LocalesY26Containers26.1General26.2Container requirementsY26.3Sequence containersY26.4Associative containersY26.5Unordered associative containersY26.6Container adaptorsY27Iterators27.1GeneralY27.2Iterator requirementsY27.3Header <iterator> synopsisY27.4Iterator primitivesY27.5Iterator adaptorsY27.6Stream iteratorsY27.7Range accessY27.8Container accessY28Algorithms28.1General28.2Header <algorithm> synopsis28.3Algorithms requirements28.4Parallel algorithmsUsing PSTL28.5Non-modifying sequence operationsY28.6Mutating sequence operationsY28.7Sorting and related operationsY28.8C library algorithmsY29Numerics29.1General29.2Definitions29.3Numeric type requirementsY29.4The floating-point environmentY29.5Complex numbersY29.6Random number generationY29.7Numeric arraysY29.8Generalized numeric operations29.8.1Header <numeric> synopsis29.8.2AccumulateY29.8.3ReduceY29.8.4Inner productY29.8.5Transform reduceY29.8.6Partial sumY29.8.7Exclusive scanY29.8.8Inclusive scanY29.8.9Transform exclusive scanY29.8.10Transform inclusive scanY29.8.11Adjacent differenceY29.8.12IotaY29.8.13Greatest common divisorY29.8.14Least common multipleY29.9Mathematical functions for floating-point types29.9.1Header <cmath> synopsis29.9.2Absolute valuesY29.9.3Three-dimensional hypotenuseY29.9.4Classification / comparison functionsY29.9.5Mathematical special functionsY30Input/output library30.1GeneralY30.2Iostreams requirementsY30.2.1Imbue LimitationsY30.2.2Positioning Type LimitationsY30.2.3Thread safetyPartial30.3Forward declarationsY30.4Standard iostream objectsY30.5Iostreams base classesY30.6Stream buffersY30.7Formatting and manipulatorsY30.8String-based streamsY30.9File-based streamsY30.10File systemssY30.11C library filesY31Regular expressions31.1GeneralY31.2DefinitionsY31.3RequirementsY31.4Header <regex> synopsisY31.5Namespace std::regex_constantsY31.6Class regex_errorY31.7Class template regex_traitsPartialtransform_primary is not correctly implemented31.8Class template basic_regexY31.9Class template sub_matchY31.10Class template match_resultsY31.11Regular expression algorithmsY31.12Regular expression IteratorsY31.13Modified ECMAScript regular expression grammarY32Atomic operations32.1GeneralY32.2Header <atomic> synopsisY32.3Type aliasesY32.4Order and consistencyY32.5Lock-free propertyY32.6Class template <atomic>Y32.7Non-member functionsY32.8Flag Type and operationsY32.9FencesY33Thread support33.1GeneralY33.2RequirementsY33.3Threads33.3.1Header thread synopsis33.3.2Class threadY33.3.2.1Class threadPartialthread::id comparisons not well-defined33.3.3Namespace this_threadY33.4Mutual exclusion33.4.3Mutex requirements33.4.3.1In general33.4.3.2Mutex types33.4.3.2.1Class mutexY33.4.3.2.2Class recursive_mutexY33.4.3.3Timed mutex types33.4.3.3.1Class timed_mutexY33.4.3.3.2Class recursive_timed_mutexY33.4.3.4Shared mutex types33.4.3.4.1Class shared_mutexY33.4.3.5Shared timed mutex types33.4.3.5.1Class shared_timed_mutexY33.4.4Locks33.4.4.1Class template lock_guardY33.4.4.2Class template scoped_guardY33.4.4.3Class template unique_lockY33.4.4.4Class template shared_lockY33.4.5Generic locking algorithmsY33.4.6Call once33.4.6.1Struct once_flagY33.4.6.2Function call_onceYException support is broken.
See PR
66146.
33.5Condition variablesY33.5.1Class condition_variableY33.5.2Class condition_variable_anyY33.6Futures33.6.1Overview33.6.2Header <future>33.6.3Error handlingY33.6.4Class future_errorY33.6.5Shared stateY33.6.6Class template promiseY33.6.7Class template futureY33.6.8Class template shared_futureY33.6.9Function template asyncY33.6.10Class template packaged_taskYAppendix DCompatibility featuresD.4C++ standard library headersYD.4.1Header <ccomplex> synopsisYD.4.1Header <cstdalign> synopsisYD.4.1Header <cstdbool> synopsisYD.4.1Header <ctgmath> synopsisYD.5C standard library headersYD.6char* streamsYD.7uncaught_exceptionYD.8Old adaptable function bindingsYD.9The default allocatorYD.10Raw storage iteratorYD.11Temporary buffersYD.12Deprecated type traitsYD.13Deprecated iterator primitivesYD.14Deprecated shared_ptr observersYD.15Deprecated standard code conversion facetsYD.16Deprecated convenience conversion interfacesY
C++ Technical Specifications Implementation StatusPaperTitleStatusComments
N4076
A generalized callable negatorYLibrary Fundamentals 2 TS
N4273
Uniform Container ErasureYLibrary Fundamentals 2 TS
N4061
Greatest Common Divisor and Least Common MultipleYLibrary Fundamentals 2 TS
N4066
Delimited iteratorsYLibrary Fundamentals 2 TS
N4282
The World's Dumbest Smart PointerYLibrary Fundamentals 2 TS
N4388
Const-Propagating WrapperYLibrary Fundamentals 2 TS
N4391
make_array, revision 4 YLibrary Fundamentals 2 TS
N4502
Support for the C++ Detection Idiom, V2 YLibrary Fundamentals 2 TS
N4519
Source-Code Information Capture YLibrary Fundamentals 2 TS
N4521
Merge Fundamentals V1 into V2
N (components from V1 are still in namespace
fundamentals_v1)
Library Fundamentals 2 TS
P0013R1
Logical Operator Type Traits (revision 1)YLibrary Fundamentals 2 TS
N4531
std::rand replacement, revision 3YLibrary Fundamentals 2 TS
P0214R9
Data-Parallel TypesYParallelism 2 TS
Implementation Specific BehaviorFor behaviour which is also specified by previous standards,
see C++ 1998/2003 Implementation
Specific Behavior and C++
2011 Implementation Specific Behavior. This section only
documents behaviour which is new in the 2017 standard.
20.5.1.2 [headers]
Whether names from Annex K are declared by C++ headers depends on
whether the underlying C library supports Annex K and declares the
names. For the GNU C library, there is no Annex K support and so
none of its names are declared by C++ headers.
23.6.5 [optional.bad_optional_access]what() returns "bad optional access".
23.7.3 [variant.variant]variant supports over-aligned types.
23.7.10 [variant.bad.access]what() returns one of the strings
"std::get: variant is valueless",
"std::get: wrong index for variant",
"std::visit: variant is valueless",
or "std::visit<R>: variant is valueless".
23.12.5.2 [memory.resource.pool.options]
Let S equal numeric_limits<size_t>::digits.
The limit for maximum number of blocks in a chunk is given by
2N-1,
where N is min(19, 3 + S/2).
The largest allocation size that will be allocated from a pool is
222
when S > 20,
otherwise 3072 when S > 16,
otherwise 768.
23.12.6.1 [memory.resource.monotonic.buffer.ctor]
The default next_buffer_size is 128 * sizeof(void*).
The default growth factor is 1.5.
23.15.4.3 [meta.unary.prop]
The predicate condition for
has_unique_object_representations is true for all scalar
types except floating point types.
23.19.3 [execpol.type],
28.4.3 [algorithms.parallel.exec]
There are no implementation-defined execution policies.
24.4.2 [string.view.template]basic_string_view<C, T>::iterator is
C* and
basic_string_view<C, T>::const_iterator is
const C*.
28.4.3 [algorithms.parallel.exec]
Threads of execution created by std::thread
provide concurrent forward progress guarantees, so threads of execution
implicitly created by the library will provide parallel forward
progress guarantees.
29.4.1 [cfenv.syn]
The effects of the <cfenv> functions
depends on whether the FENV_ACCESS pragma is supported,
and on the C library that provides the header.
29.6.9 [c.math.rand]
Whether the rand function may introduce data
races depends on the target C library that provides the function.
29.9.5 [sf.cmath]
The effect of calling the mathematical special functions with large
inputs should be documented here.
30.10.2.1 [fs.conform.9945]
The behavior of the filesystem library implementation will depend on
the target operating system. Some features will not be supported
on some targets. Symbolic links and file permissions
are not supported on Windows.
30.10.5 [fs.filesystem.syn]
The clock used for file times is an unspecified type
with a signed 64-bit representation, capable of representing
timestamps with nanosecond resolution. The clock's epoch is
unspecified, but is not the same as the system clock's epoch.
30.10.7.1 [fs.path.generic]
dot-dot in the root-directory refers to the root-directory itself.
On Windows, a drive specifier such as "C:" or
"z:" is treated as a root-name. On Cygwin, a path
that begins with two successive directory separators is a
root-name. Otherwise (for POSIX-like systems other than Cygwin),
the implementation-defined root-name is an unspecified string
which does not appear in any pathnames.
30.10.10.1 [fs.enum.path.format]
The character sequence is always interpreted in the native pathname
format.
30.10.15.4 [fs.op.file_size]
If !is_regular_file(p), an error is reported.
30.10.15.32 [fs.op.rename]
On Windows, filesystem::rename
is implemented by calling MoveFileExW and so
does not meet the requirements of POSIX rename
when one or both of the paths resolves to an existing directory.
Specifically, it is not possible to rename a directory to replace another
directory (POSIX requires that to work if the directory being
replaced is empty).
Parallelism 2 TS9.3 [parallel.simd.abi]max_fixed_size<T> is 32, except when targetting
AVX512BW and sizeof(T) is 1.
When targeting 32-bit x86,
simd_abi::compatible<T> is an alias for
simd_abi::scalar.
When targeting 64-bit x86 (including x32) or Aarch64,
simd_abi::compatible<T> is an alias for
simd_abi::_VecBuiltin<16>,
unless T is long double, in which case it is
an alias for simd_abi::scalar.
When targeting ARM (but not Aarch64) with NEON support,
simd_abi::compatible<T> is an alias for
simd_abi::_VecBuiltin<16>,
unless sizeof(T) > 4, in which case it is
an alias for simd_abi::scalar. Additionally,
simd_abi::compatible<float> is an alias for
simd_abi::scalar unless compiling with
-ffast-math.
When targeting x86 (both 32-bit and 64-bit),
simd_abi::native<T> is an alias for one of
simd_abi::scalar,
simd_abi::_VecBuiltin<16>,
simd_abi::_VecBuiltin<32>, or
simd_abi::_VecBltnBtmsk<64>, depending on
T and the machine options the compiler was invoked with.
When targeting ARM/Aarch64 or POWER,
simd_abi::native<T> is an alias for
simd_abi::scalar or
simd_abi::_VecBuiltin<16>, depending on
T and the machine options the compiler was invoked with.
For any other targeted machine
simd_abi::compatible<T> and
simd_abi::native<T> are aliases for
simd_abi::scalar. (subject to change)
The extended ABI tag types defined in the
std::experimental::parallelism_v2::simd_abi namespace are:
simd_abi::_VecBuiltin<Bytes>, and
simd_abi::_VecBltnBtmsk<Bytes>.
simd_abi::deduce<T, N, Abis...>::type,
with N > 1 is an alias for an extended ABI tag, if a
supported extended ABI tag exists. Otherwise it is an alias for
simd_abi::fixed_size<N>. The
simd_abi::_VecBltnBtmsk ABI tag is preferred over
simd_abi::_VecBuiltin.
9.4 [parallel.simd.traits]memory_alignment<T, U>::value is
sizeof(U) * T::size() rounded up to the next power-of-two
value.
9.6.1 [parallel.simd.overview]
On ARM, simd<T, _VecBuiltin<Bytes>>
is supported if __ARM_NEON is defined and
sizeof(T) <= 4. Additionally,
sizeof(T) == 8 with integral T is supported if
__ARM_ARCH >= 8, and double is supported if
__aarch64__ is defined.
On POWER, simd<T, _VecBuiltin<Bytes>>
is supported if __ALTIVEC__ is defined and sizeof(T)
< 8. Additionally, double is supported if
__VSX__ is defined, and any T with
sizeof(T) <= 8 is supported if __POWER8_VECTOR__
is defined.
On x86, given an extended ABI tag Abi,
simd<T, Abi> is supported according to the
following table:
Support for Extended ABI TagsABI tag Abivalue type Tvalues for Bytesrequired machine option_VecBuiltin<Bytes>float8, 12, 16"-msse"20, 24, 28, 32"-mavx"double16"-msse2"24, 32"-mavx"
integral types other than boolBytes ≤ 16 and Bytes divisible by
sizeof(T)"-msse2"
16 < Bytes ≤ 32 and Bytes
divisible by sizeof(T)"-mavx2"_VecBuiltin<Bytes> and
_VecBltnBtmsk<Bytes>
vectorizable types with sizeof(T) ≥ 4
32 < Bytes ≤ 64 and Bytes
divisible by sizeof(T)"-mavx512f"
vectorizable types with sizeof(T) < 4
"-mavx512bw"_VecBltnBtmsk<Bytes>
vectorizable types with sizeof(T) ≥ 4
Bytes ≤ 32 and Bytes divisible by
sizeof(T)"-mavx512vl"
vectorizable types with sizeof(T) < 4
"-mavx512bw" and "-mavx512vl"