Visual C++ Language Conformance

This topic summarizes the ISO C++03, C++11, C++14, C++17, and Draft C++20 language standards conformance of compiler features and Standard Library features for the C++ compiler in Visual Studio 2017 and earlier versions. Each compiler and standard library feature name links to the ISO C++ Standard proposal paper that describes the feature, if one is available at publication time. The Supported column lists the Visual Studio version in which support for the feature first appeared.

For details on conformance improvements and other changes in Visual Studio 2017, see C++ conformance improvements in Visual Studio 2017 and What's New for Visual C++ in Visual Studio 2017. For conformance changes in earlier versions, see Visual C++ change history and Visual C++ What's New 2003 through 2015. For current news from the C++ team, visit the Visual C++ team blog.

Note

There are no binary breaking changes between Visual Studio 2015 and Visual Studio 2017.

Compiler Features

Feature Area
C++03/11 Core Language Features Supported
  Everything else VS 2015 A
  Two-phase name lookup VS 2017 15.7 B
  N2634 Expression SFINAE VS 2017 15.7
  N1653 C99 preprocessor Partial D
  N1988 Extended integer types N/A E
C++14 Core Language Features Supported
  N3323 Tweaked wording for contextual conversions VS 2013
  N3472 Binary literals VS 2015
  N3638 auto and decltype(auto) return types VS 2015
  N3648 init-captures VS 2015
  N3649 Generic lambdas VS 2015
  N3760 [[deprecated]] attribute VS 2015
  N3778 Sized deallocation VS 2015
  N3781 Digit separators VS 2015
  N3651 Variable templates VS 2015.2
  N3652 Extended constexpr VS 2017
  N3653 NSDMIs for aggregates VS 2017
  N3664 Avoiding/fusing allocations N/A F
C++17 Core Language Features Supported
  N4086 Removing trigraphs VS 2010 14
  N3922 New rules for auto with braced-init-lists VS 2015 14
  N4051 typename in template template-parameters VS 2015 14
  N4266 Attributes for namespaces and enumerators VS 2015 14
  N4267 u8 character literals VS 2015 14
  N4230 Nested namespace definitions VS 2015.3 17
  N3928 Terse static_assert VS 2017 17
  P0184R0 Generalized range-based for-loops VS 2017 14
  P0188R1 [[fallthrough]] attribute VS 2017 17
  P0001R1 Removing the register keyword VS 2017 15.3 17
  P0002R1 Removing operator++ for bool VS 2017 15.3 17
  P0018R3 Capturing *this by value VS 2017 15.3 17
  P0028R4 Using attribute namespaces without repetition VS 2017 15.3 17
  P0061R1 __has_include VS 2017 15.3 14
  P0138R2 Direct-list-init of fixed enums from integers VS 2017 15.3 17
  P0170R1 constexpr lambdas VS 2017 15.3 17
  P0189R1 [[nodiscard]] attribute VS 2017 15.3 17
  P0212R1 [[maybe_unused]] attribute VS 2017 15.3 17
  P0217R3 Structured bindings VS 2017 15.3 17
  P0292R2 constexpr if-statements VS 2017 15.3 G
  P0305R1 Selection statements with initializers VS 2017 15.3 17
  P0245R1 Hexfloat literals VS 2017 15.5 17
  N4268 Allowing more non-type template args VS 2017 15.5 17
  N4295 Fold expressions VS 2017 15.5 17
  P0003R5 Removing dynamic-exception-specifications VS 2017 15.5 17
  P0012R1 Adding noexcept to the type system VS 2017 15.5 17
  P0035R4 Over-aligned dynamic memory allocation VS 2017 15.5 17
  P0386R2 Inline variables VS 2017 15.5 17
  P0522R0 Matching template template-parameters to compatible arguments VS 2017 15.5 17
  P0036R0 Removing some empty unary folds VS 2017 15.5 17
  N4261 Fixing qualification conversions VS 2017 15.7 17
  P0017R1 Extended aggregate initialization VS 2017 15.7 17
  P0091R3 Template argument deduction for class templates
  P0512R0 Class template argument deduction issues
VS 2017 15.7 17
  P0127R2 Declaring non-type template parameters with auto VS 2017 15.7 17
  P0135R1 Guaranteed copy elision VS 2017 15.6H
  P0136R1 Rewording inheriting constructors VS 2017 15.7 17
  P0137R1 std::launder VS 2017 15.7 17
  P0145R3 Refining expression evaluation order
  P0400R0 Order of evaluation of function arguments
VS 2017 15.7 17
  P0195R2 Pack expansions in using-declarations VS 2017 15.7 17
  P0283R2 Ignoring unrecognized attributes VS 2015 14
  P0702R1 Fixing class template argument deduction for initializer-list ctors VS 2017 15.7 17
Feature Area
C++17 Core Language Features (Defect Reports) Supported
  P0702R1 Fixing class template argument deduction for initializer-list ctors VS 2017 15.7 17
  P0588R1 Simplifying implicit lambda capture No
  CWG 1581: When are constexpr member functions defined? No
  P0962R1 Relaxing the structured bindings customization point finding rules No
  P0962R2 Relaxing the range-for loop customization point finding rules No
  P0969R0 Allowing structured bindings to accessible members No
Feature Area
C++20 Core Language Features Supported
  P0306R4 Adding __VA_OPT__ for comma omission and comma deletion No
  P0329R4 Designated initialization No
  P0409R2 Allowing lambda-capture [=, this] No
  P0428R2 Familiar template syntax for generic lambdas No
  P0683R1 Default member initializers for bit-fields No
  P0704R1 Fixing const lvalue ref-qualified pointers to members No
  P0734R0 Concepts No

Standard Library Features

Feature Area
C++20 Standard Library Features Supported
   P0777R1 Avoiding Unnecessary Decay VS 2017 15.7 14
  P0463R1 endian No
  P0674R1 make_shared() For Arrays No
  P0858R0 Constexpr Iterator Requirements VS 2017 15.3 17
  P0809R0 Comparing Unordered Containers VS 2010 14
   P0020R3 atomic<float>, atomic<double>, atomic<long double> No
   P0053R7 <syncstream>
   P0753R2 osyncstream Manipulators
No
   P0122R7 <span> No
   P0202R3 constexpr For <algorithm> And exchange() No
   P0355R7 <chrono> Calendars And Time Zones No
   P0415R1 constexpr For <complex> (Again) No
   P0439R0 enum class memory_order No
   P0457R2 starts_with()/ends_with() For basic_string/basic_string_view No
   P0550R2 remove_cvref No
   P0551R3 Thou Shalt Not Specialize std Function Templates! No
   P0600R1 [[nodiscard]] For The STL, Part 1 No
   P0616R0 Using move() In <numeric> No
   P0653R2 to_address() No
   P0718R2 atomic<shared_ptr<T>>, atomic<weak_ptr<T>> No
   P0754R2 <version> No
   P0767R1 Deprecating is_pod No
   P0768R1 Library Support For The Spaceship Comparison Operator <=> No
   P0966R1 string::reserve() Should Not Shrink No
C++17 Standard Library Features Supported
  P0433R2 Integrating template deduction for class templates into the standard library
  P0739R0 Improving class template argument deduction integration into the standard library
VS 2017 15.7
  P0426R1 constexpr For char_traits VS 2017 15.7
  P0030R1 hypot(x, y, z) VS 2017 15.7
  P0220R1 Library Fundamentals V1 VS 2017 15.6 J
  P0067R5 Elementary String Conversions VS 2017 15.7 charconv
  N4562 Library Fundamentals: <memory_resource>
  P0337R0 Deleting polymorphic_allocator Assignment
VS 2017 15.6
  P0024R2 Parallel Algorithms
  P0336R1 Renaming Parallel Execution Policies
  P0394R4 Parallel Algorithms Should terminate() For Exceptions
  P0452R1 Unifying <numeric> Parallel Algorithms
VS 2017 15.7
  P0226R1 Mathematical Special Functions VS 2017 15.7
  P0218R1 <filesystem>
  P0219R1 Relative Paths For Filesystem
  P0317R1 Directory Entry Caching For Filesystem
  P0392R0 Supporting string_view In Filesystem Paths
  P0430R2 Supporting Non-POSIX Filesystems
  P0492R2 Resolving NB Comments for Filesystem
VS 2017 15.7 K
  P0003R5 Removing Dynamic Exception Specifications VS 2017 15.5 17
  P0005R4 not_fn()
  P0358R1 Fixes For not_fn()
VS 2017 15.5 17
  P0033R1 Rewording enable_shared_from_this VS 2017 15.5 14
  P0083R3 Splicing Maps And Sets
  P0508R0 Clarifying insert_return_type
VS 2017 15.5 17
  P0174R2 Deprecating Vestigial Library Parts VS 2017 15.5 17
  P0302R1 Removing Allocator Support In std::function VS 2017 15.5 17
  P0414R2 shared_ptr<T[]>, shared_ptr<T[N]>
  P0497R0 Fixing shared_ptr For Arrays
VS 2017 15.5 14
  P0521R0 Deprecating shared_ptr::unique() VS 2017 15.5 17
  P0607R0 Inline Variables for the Standard Library VS 2017 15.5 17
  P0618R0 Deprecating <codecvt> VS 2017 15.5 17
  N4562 Library Fundamentals: Boyer-Moore search()
  P0253R1 Fixing Searcher Return Types
VS 2017 15.3 17
  P0031R0 constexpr For <array> (Again) And <iterator> VS 2017 15.3 17
  P0040R3 Extending Memory Management Tools VS 2017 15.3 17
  P0084R2 Emplace Return Type VS 2017 15.3 17
  P0152R1 atomic::is_always_lock_free VS 2017 15.3 17
  P0154R1 hardware_destructive_interference_size, etc. VS 2017 15.3 17
  P0156R2 Renaming Variadic lock_guard to scoped_lock VS 2017 15.3 17
  P0258R2 has_unique_object_representations VS 2017 15.3 L
  P0295R0 gcd(), lcm() VS 2017 15.3 17
  P0298R3 std::byte VS 2017 15.3 17, byte
  P0403R1 UDLs For <string_view> ("meow"sv, etc.) VS 2017 15.3 17
  P0418R2 atomic compare_exchange memory_order Requirements VS 2017 15.3 14
  P0435R1 Overhauling common_type
  P0548R1 Tweaking common_type and duration
VS 2017 15.3 14
  P0505R0 constexpr For <chrono> (Again) VS 2017 15.3 17
  P0513R0 Poisoning hash
  P0599R1 noexcept hash
VS 2017 15.3 14
  P0516R0 Marking shared_future Copying As noexcept VS 2017 15.3 14
  P0517R0 Constructing future_error From future_errc VS 2017 15.3 14
  P0558R1 Resolving atomic Named Base Class Inconsistencies VS 2017 15.3 14
  P0604R0 Changing is_callable/result_of To invoke_result, is_invocable, is_nothrow_invocable VS 2017 15.3 17
  N4562 Library Fundamentals: <algorithm> sample() VS 2017
  N4562 Library Fundamentals: <any> VS 2017
  N4562 Library Fundamentals: <optional> VS 2017
  N4562 Library Fundamentals: <string_view> VS 2017
  N4562 Library Fundamentals: <tuple> apply() VS 2017
  P0032R3 Homogeneous Interface For variant/any/optional VS 2017
  P0077R2 is_callable, is_nothrow_callable VS 2017
  P0088R3 <variant> VS 2017
  P0163R0 shared_ptr::weak_type VS 2017
  P0209R2 make_from_tuple() VS 2017
  P0254R2 Integrating string_view And std::string VS 2017
  P0307R2 Making Optional Greater Equal Again VS 2017
  P0393R3 Making Variant Greater Equal VS 2017
  P0504R0 Revisiting in_place_t/in_place_type_t<T>/in_place_index_t<I> VS 2017
  P0510R0 Rejecting variants Of Nothing, Arrays, References, And Incomplete Types VS 2017
  P0025R1 clamp() VS 2015.3
  P0185R1 is_swappable, is_nothrow_swappable VS 2015.3
  P0272R1 Non-const basic_string::data() VS 2015.3
  N4387 Improving pair And tuple VS 2015.2 14
  N4508 shared_mutex (Untimed) VS 2015.2 14
  P0004R1 Removing Deprecated Iostreams Aliases VS 2015.2 rem
  P0006R0 Variable Templates For Type Traits (is_same_v, etc.) VS 2015.2 14
  P0007R1 as_const() VS 2015.2 14
  P0013R1 Logical Operator Type Traits (conjunction, etc.) VS 2015.2 14
  P0074R0 owner_less<> VS 2015.2 14
  P0092R1 <chrono> floor(), ceil(), round(), abs() VS 2015.2 14
  P0156R0 Variadic lock_guard VS 2015.2 14
  N3911 void_t VS 2015 14
  N4089 Safe Conversions In unique_ptr<T[]> VS 2015 14
  N4169 invoke() VS 2015 14
  N4190 Removing auto_ptr, random_shuffle(), And Old <functional> Stuff VS 2015 rem
  N4258 noexcept Cleanups VS 2015 14
  N4259 uncaught_exceptions() VS 2015 14
  N4277 Trivially Copyable reference_wrapper VS 2015 14
  N4279 insert_or_assign()/try_emplace() For map/unordered_map VS 2015 14
  N4280 size(), empty(), data() VS 2015 14
  N4366 Precisely Constraining unique_ptr Assignment VS 2015 14
  N4389 bool_constant VS 2015 14
  P0063R3 C11 Standard Library VS 2015 C11, 14
  N4510 Supporting Incomplete Types In vector/list/forward_list VS 2013 14
C++14 Standard Library Features Supported
  N3462 SFINAE-Friendly result_of VS 2015.2
  N3302 constexpr For <complex> VS 2015
  N3469 constexpr For <chrono> VS 2015
  N3470 constexpr For <array> VS 2015
  N3471 constexpr For <initializer_list>, <tuple>, <utility> VS 2015
  N3545 integral_constant::operator()() VS 2015
  N3642 UDLs For <chrono>, <string> (1729ms, "meow"s, etc.) VS 2015
  N3644 Null Forward Iterators VS 2015
  N3654 quoted() VS 2015
  N3657 Heterogeneous Associative Lookup VS 2015
  N3658 integer_sequence VS 2015
  N3659 shared_mutex (Timed) VS 2015
  N3668 exchange() VS 2015
  N3669 Fixing constexpr Member Functions Without const VS 2015
  N3670 get<T>() VS 2015
  N3671 Dual-Range equal(), is_permutation(), mismatch() VS 2015
  N3778 Sized Deallocation VS 2015
  N3779 UDLs For <complex> (3.14i, etc.) VS 2015
  N3789 constexpr For <functional> VS 2015
  N3887 tuple_element_t VS 2015
  N3891 Renaming shared_mutex (Timed) To shared_timed_mutex VS 2015
  N3346 Minimal Container Element Requirements VS 2013
  N3421 Transparent Operator Functors (less<>, etc.) VS 2013
  N3655 Alias Templates For <type_traits> (decay_t, etc.) VS 2013
  N3656 make_unique() VS 2013
  N3924 Discouraging rand() N/A

A group of papers listed together indicates that a feature was voted into the Standard, and then one or more papers to improve or expand that feature were also voted in. These features are implemented together.

Supported values

No means not yet implemented.
Partial means the implementation in Visual Studio 2017 is incomplete. For more details, see the Notes section.
N/A means the proposal papers do not describe features. These papers altered the language of the standard, but didn’t create any work for implementers. They’re listed here for completeness.
VS 2010 indicates features that are supported in Visual Studio 2010.
VS 2013 indicates features that are supported in Visual Studio 2013.
VS 2015 indicates features that are supported in Visual Studio 2015 RTM.
VS 2015.2 and VS 2015.3 indicate features that are supported in Visual Studio 2015 Update 2 and Visual Studio 2015 Update 3, respectively.
VS 2017 indicates features that are supported in Visual Studio 2017 RTM.
VS 2017 15.3 indicates features that are supported in Visual Studio 2017 version 15.3.
VS 2017 15.5 indicates features that are supported in Visual Studio 2017 version 15.5.
VS 2017 15.7 indicates features that are supported in Visual Studio 2017 version 15.7.

Notes

A In /std:c++14 mode, dynamic exception specifications remain unimplemented, and throw() is still treated as a synonym for __declspec(nothrow). In C++17, dynamic exception specifications were mostly removed by P0003R5, leaving one vestige: throw() is deprecated and required to behave as a synonym for noexcept. In /std:c++17 mode, MSVC now conforms to the Standard by giving throw() the same behavior as noexcept, i.e. enforcement via termination.

The compiler option /Zc:noexceptTypes- requests our old behavior of __declspec(nothrow). It’s likely that throw() will be removed in C++20. To help with migrating code in response to these changes in the Standard and our implementation, new compiler warnings for exception specification issues have been added under /std:c++17 and /permissive-.

B Supported in /permissive- mode in Visual Studio 2017 version 15.7. See Two-phase name lookup support comes to MSVC for more information.

C The compiler’s support for Expression SFINAE has been sufficient for the Standard Library since Visual Studio 2015 Update 2. Supported in Visual Studio 2017 15.7 regardless of whether /permissive- mode is set. Some bugs remain to be fixed. The “unique tag type” workaround is no longer necessary, and we’ve removed this workaround from our STL implementation.

D The compiler’s support for C99 Preprocessor rules is incomplete in Visual Studio 2017. Variadic macros are supported, but there are many bugs in the preprocessor’s behavior. We are overhauling the preprocessor, and will experimentally ship those changes under the /permissive- mode soon.

E This is marked as Not Applicable because compilers are permitted, but not required, to support extended integer types. Like GCC and Clang, we’ve chosen not to support them.

F Similarly, this is marked as Not Applicable because compilers are permitted, but not required, to implement this optimization.

G Supported under /std:c++14 with a suppressible warning.

J Features that were not completed in Visual Studio 2015 are broken out elsewhere in this table.

K This is a completely new implementation, incompatible with the previous std::experimental version, necessitated by symlink support, bug fixes, and changes in standard-required behavior. Currently, including <filesystem> provides the new std::filesystem and the previous std::experimental::filesystem, and including <experimental/filesystem> provides only the old experimental implementation. The experimental implementation will be REMOVED in the next ABI-breaking release of the libraries.

L Supported by a compiler intrinsic.

14 These C++17/20 features are always enabled, even when /std:c++14 (the default) is specified. This is either because the feature was implemented before the introduction of the /std options, or because conditional implementation was undesirably complex.

17 These features are enabled by the /std:c++17 (or /std:c++latest) compiler option.

byte std::byte is enabled by /std:c++17 (or /std:c++latest), but because it can conflict with the Windows SDK headers in some cases, it has a fine-grained opt-out macro. It can be disabled by defining _HAS_STD_BYTE as 0.

C11 The Universal CRT implemented the parts of the C11 Standard Library that are required by C++17, with the exception of C99 strftime() E/O alternative conversion specifiers, C11 fopen() exclusive mode, and C11 aligned_alloc(). The latter is unlikely to be implemented, because C11 specified aligned_alloc() in a way that's incompatible with the Microsoft implementation of free(), namely, that free() must be able to handle highly aligned allocations.

rem Features removed when the /std:c++17 (or /std:c++latest) compiler option is specified. These features have opt-out macros: _HAS_AUTO_PTR_ETC, _HAS_FUNCTION_ALLOCATOR_SUPPORT, _HAS_OLD_IOSTREAMS_MEMBERS, and _HAS_UNEXPECTED.

charconv from_chars() and to_chars() are available for integers. We’re currently working on floating-point from_chars(), to be followed by floating-point to_chars().

parallel C++17’s parallel algorithms library is complete. Note that this doesn’t mean every algorithm is parallelized in every case; the most important algorithms have been parallelized and execution policy signatures are provided even where algorithms are not parallelized. Our STL implementation’s central internal header, yvals.h, contains the following “Parallel Algorithms Notes”: C++ allows an implementation to implement parallel algorithms as calls to the serial algorithms. This implementation parallelizes several common algorithm calls, but not all.

The following algorithms are parallelized:

  • adjacent_difference, adjacent_find, all_of, any_of, count, count_if, equal, exclusive_scan, find, find_end, find_first_of, find_if, for_each, for_each_n, inclusive_scan, mismatch, none_of, reduce, remove, remove_if, search, search_n, sort, stable_sort, transform, transform_exclusive_scan, transform_inclusive_scan, transform_reduce.

The following are not presently parallelized:

  • No apparent parallelism performance improvement on target hardware; all algorithms which merely copy or permute elements with no branches are typically memory bandwidth limited:
    • copy, copy_backward, copy_n, fill, fill_n, move, move_backward, remove, remove_if, replace, replace_if, reverse, reverse_copy, rotate, rotate_copy, swap_ranges
  • Confusion over user parallelism requirements exists; likely in the above category anyway:
    • generate, generate_n
  • Effective parallelism suspected to be infeasible:
    • partial_sort, partial_sort_copy
  • Not yet evaluated; parallelism may be implemented in a future release and is suspected to be beneficial:
    • copy_if, includes, inplace_merge, is_heap, is_heap_until, is_partitioned, is_sorted, is_sorted_until, lexicographical_compare, max_element, merge, min_element, minmax_element, nth_element, partition_copy, remove_copy, remove_copy_if, replace_copy, replace_copy_if, set_difference, set_intersection, set_symmetric_difference, set_union, stable_partition, unique, unique_copy

See also

C++ Language Reference
C++ Standard Library
C++ conformance improvements in Visual Studio 2017
What's New for Visual C++ in Visual Studio 2017
Visual C++ change history 2003 through 2015
Visual C++ What's New 2003 through 2015
Visual C++ team blog