Zgodność ze standardami kompilatora microsoft C/C++ w programie Visual Studio (MSVC) jest w toku. Poniżej przedstawiono podsumowanie zgodności języka ISO Standard C i C++ i biblioteki z wersją programu Visual Studio. Każda nazwa funkcji kompilatora języka C++ i standardowej biblioteki zawiera link do dokumentu propozycji STANDARD C++ ISO, który opisuje tę funkcję, gdy jest dostępny w czasie publikacji. W kolumnie Obsługiwane jest wyświetlana wersja programu Visual Studio, w której po raz pierwszy pojawiła się obsługa funkcji.
Aby uzyskać szczegółowe informacje na temat ulepszeń zgodności, zobacz Ulepszenia zgodności języka C++ w programie Visual Studio. Aby uzyskać listę innych zmian, zobacz Co nowego dla języka Visual C++ w programie Visual Studio. Aby uzyskać informacje o zmianach zgodności we wcześniejszych wersjach, zobacz Historia zmian języka Visual C++ i Visual C++ Co nowego w wersji 2003–2015. Aby uzyskać aktualne informacje od zespołu języka C++, odwiedź blog zespołu języka C++.
Funkcje kompilatora języka C++
Funkcje standardowej biblioteki języka C++
Bardziej szczegółowa lista funkcji biblioteki standardowej i poprawek usterek według wersji produktu jest dostępna na stronie dziennika zmian w witrynie Microsoft STL firmy Microsoft w witrynie GitHub.
Funkcja |
Obsługiwane |
Funkcje biblioteki standardowej języka C++14 |
Obsługiwane |
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 |
Funkcje standardowej biblioteki języka C++17 |
Obsługiwane |
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 F |
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 |
N4387 Improving pair And tuple |
VS 2015.2 14 |
N4389 bool_constant |
VS 2015 14 |
N4508 shared_mutex (Untimed) |
VS 2015.2 14 |
N4510 Supporting Incomplete Types In vector/list/forward_list |
VS 2013 14 |
N4562 Library Fundamentals: <algorithm> sample() |
VS 2017 15.0 |
N4562 Library Fundamentals: <any> |
VS 2017 15.0 |
N4562 Library Fundamentals: <memory_resource> P0337R0 Deleting polymorphic_allocator Assignment |
VS 2017 15.6 |
N4562 Library Fundamentals: <optional> |
VS 2017 15.0 |
N4562 Library Fundamentals: <string_view> |
VS 2017 15.0 |
N4562 Library Fundamentals: <tuple> apply() |
VS 2017 15.0 |
N4562 Library Fundamentals: Boyer-Moore search() P0253R1 Fixing Searcher Return Types |
VS 2017 15.3 17 |
P0003R5 Removing Dynamic Exception Specifications |
VS 2017 15.5 17 |
P0004R1 Removing Deprecated Iostreams Aliases |
VS 2015.2 F |
P0005R4 not_fn() P0358R1 Fixes For not_fn() |
VS 2017 15.5 17 |
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 |
P0024R2 Parallel Algorithms P0336R1 Renaming Parallel Execution Policies P0394R4 Parallel Algorithms Should terminate() For Exceptions P0452R1 Unifying <numeric> Parallel Algorithms |
VS 2017 15,7 G |
P0025R1 clamp() |
VS 2015.3 |
P0030R1 hypot(x, y, z) |
VS 2017 15.7 |
P0031R0 constexpr For <array> (Again) And <iterator> |
VS 2017 15.3 17 |
P0032R3 Homogeneous Interface For variant/any/optional |
VS 2017 15.0 |
P0033R1 Rewording enable_shared_from_this |
VS 2017 15.5 14 |
P0040R3 Extending Memory Management Tools |
VS 2017 15.3 17 |
P0063R3 C11 Standard Library |
VS 2015 C11, 14 |
P0067R5 Elementary String Conversions |
VS 2019 16.4 |
P0074R0 owner_less<> |
VS 2015.2 14 |
P0077R2 is_callable, is_nothrow_callable |
VS 2017 15.0 |
P0083R3 Splicing Maps And Sets P0508R0 Clarifying insert_return_type |
VS 2017 15.5 17 |
P0084R2 Emplace Return Type |
VS 2017 15.3 17 |
P0088R3 <variant> |
VS 2017 15.0 |
P0092R1 <chrono> floor(), ceil(), round(), abs() |
VS 2015.2 14 |
P0152R1 atomic::is_always_lock_free |
VS 2017 15.3 17 |
P0154R1 hardware_destructive_interference_size, etc. |
VS 2017 15.3 17 |
P0156R0 Variadic lock_guard |
VS 2015.2 14 |
P0156R2 Renaming Variadic lock_guard to scoped_lock |
VS 2017 15.3 17 |
P0163R0 shared_ptr::weak_type |
VS 2017 15.0 |
P0174R2 Deprecating Vestigial Library Parts |
VS 2017 15.5 17 |
P0185R1 is_swappable, is_nothrow_swappable |
VS 2015.3 |
P0209R2 make_from_tuple() |
VS 2017 15.0 |
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 H |
P0220R1 Library Fundamentals V1 |
VS 2017 15.6 |
P0226R1 Mathematical Special Functions |
VS 2017 15.7 |
P0254R2 Integrating string_view And std::string |
VS 2017 15.0 |
P0258R2 has_unique_object_representations |
VS 2017 15.3 I |
P0272R1 Non-const basic_string::data() |
VS 2015.3 |
P0295R0 gcd(), lcm() |
VS 2017 15.3 17 |
P0298R3 std::byte |
VS 2017 15.3 17, J |
P0302R1 Removing Allocator Support In std::function |
VS 2017 15.5 17 |
P0307R2 Making Optional Greater Equal Again |
VS 2017 15.0 |
P0393R3 Making Variant Greater Equal |
VS 2017 15.0 |
P0403R1 UDLs For <string_view> ("meow"sv, etc.) |
VS 2017 15.3 17 |
P0414R2 shared_ptr<T[]>, shared_ptr<T[N]> P0497R0 Fixing shared_ptr For Arrays |
VS 2017 15.5 14 |
P0418R2 atomic compare_exchange memory_order Requirements |
VS 2017 15.3 14 |
P0426R1 constexpr For char_traits |
VS 2017 15.7 |
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 |
P0435R1 Overhauling common_type P0548R1 Tweaking common_type and duration |
VS 2017 15.3 14 |
P0504R0 Revisiting in_place_t/in_place_type_t<T>/in_place_index_t<I> |
VS 2017 15.0 |
P0505R0 constexpr For <chrono> (Again) |
VS 2017 15.3 17 |
P0510R0 Rejecting variants Of Nothing, Arrays, References, And Incomplete Types |
VS 2017 15.0 |
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 |
P0521R0 Deprecating shared_ptr::unique() |
VS 2017 15.5 17 |
P0558R1 Resolving atomic<T> Named Base Class Inconsistencies |
VS 2017 15.3 14 |
P0595R2 std::is_constant_evaluated() |
VS 2019 16.5 20 |
P0602R4 Propagating Copy/Move Triviality In variant/optional |
VS 2017 15.317 |
P0604R0 Changing is_callable/result_of To invoke_result, is_invocable, is_nothrow_invocable |
VS 2017 15.3 17 |
P0607R0 Inline Variables for the Standard Library |
VS 2017 15.5 17 |
P0618R0 Deprecating <codecvt> |
VS 2017 15.5 17 |
Funkcje standardowej biblioteki języka C++17 (raporty o wadach) |
Obsługiwane |
P0682R1 Repairing Elementary String Conversions |
VS 2015 15.7 17 |
P1164R1 Making create_directory() Intuitive |
VS 2019 16.0 14 |
Funkcje biblioteki standardowej języka C++20 |
Obsługiwane |
P0809R0 Comparing Unordered Containers |
VS 2010 14 |
P0858R0 Constexpr Iterator Requirements |
VS 2017 15.3 17 |
P0777R1 Avoiding Unnecessary Decay |
VS 2017 15.7 14 |
P0550R2 remove_cvref |
VS 2019 16.0 20 |
P0318R1 unwrap_reference, unwrap_ref_decay |
VS 2019 16.1 20 |
P0457R2 starts_with()/ends_with() For basic_string/basic_string_view |
VS 2019 16.1 20 |
P0458R2 contains() For Ordered And Unordered Associative Containers |
VS 2019 16.1 20 |
P0646R1 list/forward_list remove()/remove_if()/unique() Return size_type |
VS 2019 16.1 20 |
P0769R2 shift_left(), shift_right() |
VS 2019 16.1 20 |
P0887R1 type_identity |
VS 2019 16.1 20 |
P0020R6 atomic<float>, atomic<double>, atomic<long double> |
VS 2019 16.2 20 |
P0463R1 endian |
VS 2019 16.2 20 |
P0482R6 char8_t: A type for UTF-8 characters and strings |
VS 2019 16.2 20 |
P0600R1 [[nodiscard]] For The STL, Part 1 |
VS 2019 16.2 20 |
P0653R2 to_address() |
VS 2019 16.2 20 |
P0754R2 <version> |
VS 2019 16.2 20 |
P0771R1 noexcept For std::function's Move Constructor |
VS 2019 16.2 20 |
P0487R1 Fixing operator>>(basic_istream&, CharT*) |
VS 2019 16.3 20 |
P0616R0 Using move() In <numeric> |
VS 2019 16.3 20 |
P0758R1 is_nothrow_convertible |
VS 2019 16.3 20 |
P0898R3 Standard Library Concepts |
VS 2019 16.3 20 |
P0919R3 Heterogeneous Lookup For Unordered Containers |
VS 2019 16.3 20 |
P1754R1 Rename Concepts to standard_case |
VS 2019 16.4 20 |
P0325R4 to_array from LFTS with updates |
VS 2019 16.5 20 |
P0340R3 SFINAE-Friendly underlying_type |
VS 2019 16.5 14 |
P0356R5 bind_front() |
VS 2019 16.5 20 |
P0439R0 enum class memory_order |
VS 2019 16.5 20 |
P0553R4 <bit> Rotating And Counting Functions |
VS 2019 16.5 20 |
P0556R3 <bit> ispow2(), ceil2(), floor2(), log2p1() |
VS 2019 16.5 20 |
P0595R2 is_constant_evaluated() |
VS 2019 16.5 20 |
P0631R8 <numbers> Math Constants |
VS 2019 16.5 20 |
P0655R1 visit<R>() |
VS 2019 16.5 20 |
P0738R2 istream_iterator Cleanup |
VS 2019 16.5 14 |
P0767R1 Deprecating is_pod |
VS 2019 16.5 20 |
P0966R1 string::reserve() Should Not Shrink |
VS 2019 16.5 20 |
P1209R0 erase_if(), erase() |
VS 2019 16.5 20 |
P1227R2 Signed std::ssize(), Unsigned span::size() |
VS 2019 16.5 20 |
P1355R2 Narrow Contract For ceil2() |
VS 2019 16.5 20 |
P1357R1 is_bounded_array, is_unbounded_array |
VS 2019 16.5 20 |
P1612R1 Relocating endian To <bit> |
VS 2019 16.5 20 |
P1651R0 bind_front() Should Not Unwrap reference_wrapper |
VS 2019 16.5 20 |
P1690R1 Refining Heterogeneous Lookup For Unordered Containers |
VS 2019 16.5 20 |
P1902R1 Missing Feature-Test Macros 2017-2019 |
VS 2019 16.5 14 |
P0122R7 <span> P1024R3 Enhancing span usability P1085R2 Removing span comparisons P1394R4 Range constructor for span P1872R0 span should have size_type, not index_type |
VS 2019 16.6 20 |
P0202R3 constexpr for <algorithm> and exchange() |
VS 2019 16.6 20 |
P0357R3 Supporting Incomplete Types In reference_wrapper |
VS 2019 16.6 20 |
P0619R4 Removing C++17-Deprecated Features In C++20 |
VS 2019 16.6 20 |
P0879R0 constexpr for swapping functions |
VS 2019 16.6 20 |
P0883R2 Fixing atomic initialization |
VS 2019 16.6 14 |
P0935R0 Eradicating Unnecessarily Explicit Default Constructors |
VS 2019 16.6 14 |
P1006R1 constexpr For pointer_traits<T*>::pointer_to() |
VS 2019 16.6 20 |
P1165R1 Consistently Propagating Stateful Allocators In basic_string's operator+() |
VS 2019 16.6 14 |
P1423R3 char8_t backward compatibility remediation |
VS 2019 16.6 20 |
P1645R1 constexpr for <numeric> algorithms |
VS 2019 16.6 20 |
P0415R1 constexpr For <complex> (Again) |
VS 2019 16.7 20 |
P0476R2 <bit> bit_cast |
VS 2019 16.7 20 |
P0528R3 Atomic Compare-And-Exchange With Padding Bits |
VS 2019 16.7 20 |
P0586R2 Integer comparison functions |
VS 2019 16.7 20 |
P0674R1 make_shared() For Arrays |
VS 2019 16.7 20 |
P0718R2 atomic<shared_ptr<T>>, atomic<weak_ptr<T>> |
VS 2019 16.7 20 |
P1023R0 constexpr For std::array Comparisons |
VS 2019 16.7 20 |
P1115R3 erase()/erase_if() Return size_type |
VS 2019 16.7 20 |
P1831R1 Deprecating volatile in the standard library |
VS 2019 16.7 20 |
P1871R1 Concept traits should be named after concepts |
VS 2019 16.7 20 |
P1956R1 <bit> has_single_bit(), bit_ceil(), bit_floor(), bit_width() |
VS 2019 16.7 20 |
P1964R2 Replacing boolean With boolean-testable |
VS 2019 16.7 20 |
P1976R2 Fixed-size span construction from dynamic range |
VS 2019 16.7 20 |
P2091R0 Issues with range access CPOs |
VS 2019 16.7 20 |
P2102R0 Make "implicit expression variations" more explicit |
VS 2019 16.7 20 |
P2116R0 Remove tuple-like protocol support from fixed-extent span |
VS 2019 16.7 20 |
P0019R8 atomic_ref |
VS 2019 16.8 20 |
P0528R3 Library support for atomic compare-and-exchange with padding bits |
VS 2019 16.8 20 |
P0811R3 midpoint(), lerp() |
VS 2019 16.8 20 |
P0912R5 Library Support For Coroutines |
VS 2019 16.8 20 |
P1001R2 execution::unseq |
VS 2019 16.8 20 |
P1032R1 Miscellaneous constexpr |
VS 2019 16.8 20 |
P1065R2 constexpr INVOKE |
VS 2019 16.8 20 |
P1123R0 Editorial Guidance for merging P0019r8 and P0528r3 |
VS 2019 16.8 20 |
P1960R0 NB Comment Changes Reviewed by SG1 |
VS 2019 16.8 20 |
P0339R6 polymorphic_allocator<> |
VS 2019 16.9 20 |
P0660R10 <stop_token> and jthread |
VS 2019 16.9 20 |
P0768R1 Library Support For The Spaceship Comparison Operator <=> |
VS 2019 16.9 20 |
P1007R3 assume_aligned() |
VS 2019 16.9 20 |
P1020R1 Smart Pointer Creation With Default Initialization |
VS 2019 16.9 20 |
P1135R6 The C++20 Synchronization Library |
VS 2019 16.9 20 |
P1771R1 Library support for [[nodiscard]] for constructors |
VS 2019 16.9 20 |
P0053R7 <syncstream> P0753R2 osyncstream Manipulators |
VS 2019 16.10 20 |
P0355R7 <chrono> Calendars And Time Zones |
VS 2019 16.10 20abi |
P0408R7 Efficient access To basic_stringbuf's buffer |
VS 2019 16.10 20 |
P0466R5 Library support for layout-compatibility and pointer-interconvertibility traits |
VS 2019 16.10 20 |
P0475R1 Guaranteed Copy Elision For Piecewise Construction |
VS 2019 16.10 20 |
P0591R4 Utility Functions For Uses-Allocator Construction |
VS 2019 16.10 20 |
P0608R3 Improving variant's Converting Constructor/Assignment |
VS 2019 16.10 20 |
P0645R10 <format> Text Formatting |
VS 2019 16.10 20abi |
P0784R7 Library support for more constexpr containers |
VS 2019 16.10 20 |
P0896R4 <ranges> |
VS 2019 16.10 20abi |
P0980R1 constexpr std::string |
VS 2019 16.10 20, P |
P1004R2 constexpr std::vector |
VS 2019 16.10 20, P |
P1208R6 <source_location> |
VS 2019 16.10 20 |
P1502R1 Standard Library Header Units |
VS 2019 16.10 20 |
P1614R2 Adding Spaceship <=> To The Library |
VS 2019 16.10 20 |
P1285R0 Improving Completeness Requirements For Type Traits |
Nie dotyczy |
Funkcje standardowej biblioteki języka C++20 (raporty o wadach) |
Obsługiwane |
P2325R3 Views Should Not Be Required To Be Default Constructible |
VS 2022 17.0 20abi |
P2328R1 join_view should join all views of ranges |
VS 2022 17.0 20abi |
P2367R0 Remove misuses of list-initialization from clause 24 ranges |
VS 2022 17.0 20abi |
P2259R1 Partial LWG issue resolution: repairing Input Range Adaptors and counted_iterator |
VS 2022 17.0 23 |
Funkcje standardowej biblioteki języka C++23 |
Obsługiwane |
P0288R9 move_only_function |
VS 2022 17.2 23 |
P0323R12 <expected> |
VS 2022 17.3 23 |
P0401R6 Providing Size Feedback In The Allocator Interface |
VS 2022 17.0 23 |
P0448R4 <spanstream> |
VS 2022 17.1 23 |
P0627R6 unreachable() |
VS 2022 17.2 23 |
P0798R8 Monadic Operations For optional |
VS 2022 17.2 23 |
P0849R8 auto(x): decay-copy In The Language |
VS 2022 17.4 23 |
P0881R7 <stacktrace> |
VS 2022 17.4 23 |
P0943R6 Supporting C Atomics In C++ |
VS 2022 17.1 23 |
P1048R1 is_scoped_enum |
VS 2022 17.0 23 |
P1072R10 basic_string::resize_and_overwrite |
VS 2022 17.1 23 |
P1132R7 out_ptr(), inout_ptr() |
VS 2022 17.0 23 |
P1147R1 Printing volatile Pointers |
VS 2022 17.1 23 |
P1206R7 Conversions From Ranges To Containers |
VS 2022 17.4 23 |
P1272R4 byteswap() |
VS 2022 17.1 23 |
P1328R1 constexpr type_info::operator==() |
VS 2022 17.4 23 |
P1413R3 Deprecate aligned_storage And aligned_union |
VS 2022 17.3 23 |
P1425R4 Iterator Pair Constructors For stack And queue |
VS 2022 17.1 23 |
P1518R2 Stop Overconstraining Allocators In Container Deduction Guides |
VS 2022 17.1 23 |
P1659R3 ranges::starts_with, ranges::ends_with |
VS 2022 17.1 23 |
P1679R3 contains() For basic_string/basic_string_view |
VS 2022 17.0 23 |
P1682R3 to_underlying() For Enumerations |
VS 2022 17.0 23 |
P1899R3 views::stride |
VS 2022 17.4 23 |
P1951R1 Default Template Arguments For pair's Forwarding Constructor |
VS 2022 17.0 23 |
P1989R2 Range Constructor For string_view |
VS 2022 17.0 23 |
P2077R3 Heterogeneous Erasure Overloads For Associative Containers |
VS 2022 17.2 23 |
P2136R3 invoke_r() |
VS 2022 17.1 23 |
P2162R2 Inheriting from std::variant |
VS 2022 17.0 17 |
P2166R1 Prohibit basic_string and basic_string_view from being constructed from nullptr |
VS 2022 17.0 23, R |
P2186R2 Removed garbage collection support |
VS 2022 17.0 23, Q |
P2251R1 Require span And basic_string_view To Be Trivially Copyable |
VS 2022 17.1 23 |
P2273R3 constexpr unique_ptr |
VS 2022 17.3 23 |
P2291R3 constexpr Integral <charconv> |
VS 2022 17.4 23 |
P2302R4 ranges::contains, ranges::contains_subrange |
VS 2022 17.4 23 |
P2321R2 std::zip |
częściowe w programie VS 2022 17.5 23 |
P2322R6 ranges::fold_left, ranges::fold_right, etc. |
VS 2022 17.5 23 |
P2387R3 Pipe Support For User-Defined Range Adaptors |
VS 2022 17.4 23 |
P2393R1 Cleaning Up Integer-Class Types |
VS 2022 17.2 23 |
P2401R0 Conditional noexcept For exchange() |
VS 2022 17.1 23 |
P2408R5 Ranges Iterators As Inputs To Non-Ranges Algorithms |
VS 2022 17.4 23 |
P2417R2 More constexpr bitset |
VS 2022 17.4 23 |
P2419R2 Clarify Handling Of Encodings In Localized Formatting Of chrono Types |
VS 2022 17.4 23 |
P2438R2 string::substr() && |
VS 2022 17.4 23 |
P2440R1 ranges::iota, ranges::shift_left, ranges::shift_right |
VS 2022 17.4 23 |
P2441R2 views::join_with |
VS 2022 17.4 23 |
P2442R1 Windowing Range Adaptors: views::chunk, views::slide |
VS 2022 17.3 23 |
P2443R1 views::chunk_by |
VS 2022 17.3 23 |
P2445R1 forward_like() |
VS 2022 17.4 23 |
P2446R2 views::as_rvalue |
VS 2022 17.4 23 |
P2465R3 Standard Library Modules std And std.compat |
nie |
P2494R2 Relaxing Range Adaptors To Allow Move-Only Types |
VS 2022 17.4 23 |
P2499R0 string_view Range Constructor Should Be explicit |
VS 2022 17.4 23 |
P2508R1 basic_format_string, format_string, wformat_string |
VS 2022 17.5 23 |
P2517R1 Conditional noexcept For apply() |
VS 2022 17.4 23 |
P2520R0 move_iterator<T*> Should Be A Random-Access Iterator |
VS 2022 17.4 23 |
P2549R1 unexpected<E>::error() |
VS 2022 17.3 23 |
Grupa dokumentów wymienionych razem wskazuje funkcję standardową wraz z co najmniej jednym zatwierdzonym ulepszeniami lub rozszerzeniami. Te funkcje są implementowane razem.
Funkcje biblioteki C Standard
Funkcja |
Obsługiwane |
Funkcje biblioteki standardowej C99 |
Obsługiwane |
Alternatywne makra pisowni <iso646.h> |
VS 2015 |
Obsługa <wchar.h> znaków szerokich i <wctype.h> |
VS 2015 |
Złożona obsługa w systemie <complex.h> |
Częściowe w programie VS 2015 K |
Typ ogólnych funkcji matematycznych <tgmath.h> |
VS 2019 16.8 2104 |
Dodatkowe cechy zmiennoprzecinkowe <float.h> |
VS 2015 |
Specyfikatory %A szesnastkowe printf zmiennoprzecinkowe , %a |
VS 2015 |
Rozszerzone typy liczb całkowitych <inttypes.h> , <stdint.h> |
VS 2015 |
vscanf rodzina w i <stdio.h> <wchar.h> |
VS 2015 |
Nowe funkcje matematyczne w programie <math.h> |
VS 2015 |
Leczenie warunków błędów biblioteki matematycznej (math_errhandling ) |
VS 2015 |
Dostęp do środowiska zmiennoprzecinkowego <fenv.h> |
VS 2015 |
%lf specyfikator konwersji dla printf |
VS 2015 |
snprintf rodzina funkcji w <stdio.h> |
VS 2015 |
boolean wpisz w <stdbool.h> |
VS 2015 |
va_copy Makro |
VS 2015 |
Dodatkowe strftime specyfikatory konwersji |
Częściowe w programie VS 2015 L |
Funkcje biblioteki standardowej C11 |
Obsługiwane |
Specyfikatory wyrównania <stdalign.h> |
VS 2019 16.8 C11, 2104 |
aligned_alloc |
Brak języka M |
Brak specyfikatorów zwracanych <stdnoreturn.h> |
VS 2019 16.8 C11, 2104 |
Obsługa wątków <threads.h> |
tak |
Obsługa niepodzielna <stdatomic.h> |
eksperymentalny |
char16_t , char32_t <uchar.h> |
VS 2019 16.8 C11 |
gets() Usunięte |
VS 2019 16.8 C11, N |
gets_s() |
VS 2019 16.8 C11 |
Interfejsy sprawdzania granic (*_s interfejsy API) |
Częściowe w programie VS 2015 C11, O |
fopen "x" opcja |
VS 2019 16.8 C11 |
Asercji statycznych |
VS 2019 16.8 C11, 2104 |
quick_exit |
VS 2019 16.8 C11 |
<complex.h> Makra |
VS 2019 16.8 C11 |
cechy zmiennoprzecinkowe <float.h> |
VS 2019 16.8 C11 |
Wątki C11 <threads.h> |
VS 2022 17.8 C11 |
Obsługiwane wartości
Nie zaimplementowano jeszcze.
Częściowa implementacja jest niekompletna. Aby uzyskać więcej informacji, zobacz sekcję Uwagi .
Program VS 2010 obsługiwany w programie Visual Studio 2010.
Program VS 2013 obsługiwany w programie Visual Studio 2013.
Program VS 2015 obsługiwany w programie Visual Studio 2015 (RTW).
Programy VS 2015.2 i VS 2015.3 wskazują funkcje obsługiwane odpowiednio w programach Visual Studio 2015 Update 2 i Visual Studio 2015 Update 3.
Program VS 2017 15.0 obsługiwany w programie Visual Studio 2017 w wersji 15.0 (RTW).
Program VS 2017 15.3 obsługiwany w programie Visual Studio 2017 w wersji 15.3.
Program VS 2017 15.5 obsługiwany w programie Visual Studio 2017 w wersji 15.5.
Program VS 2017 15.7 obsługiwany w programie Visual Studio 2017 w wersji 15.7.
Program VS 2019 16.0 obsługiwany w programie Visual Studio 2019 w wersji 16.0 (RTW).
Program VS 2019 16.1 obsługiwany w programie Visual Studio 2019 w wersji 16.1.
Program VS 2019 16.2 obsługiwany w programie Visual Studio 2019 w wersji 16.2.
Program VS 2019 16.3 obsługiwany w programie Visual Studio 2019 w wersji 16.3.
Program VS 2019 16.4 obsługiwany w programie Visual Studio 2019 w wersji 16.4.
Program VS 2019 16.5 obsługiwany w programie Visual Studio 2019 w wersji 16.5.
Program VS 2019 16.6 obsługiwany w programie Visual Studio 2019 w wersji 16.6.
Program VS 2019 16.7 obsługiwany w programie Visual Studio 2019 w wersji 16.7.
Program VS 2019 16.8 obsługiwany w programie Visual Studio 2019 w wersji 16.8.
Program VS 2019 16.9 obsługiwany w programie Visual Studio 2019 w wersji 16.9.
Program VS 2019 16.10 obsługiwany w programie Visual Studio 2019 w wersji 16.10.
Program VS 2022 17.0 obsługiwany w programie Visual Studio 2022 w wersji 17.0.
PROGRAM VS 2022 17.1 obsługiwany w programie Visual Studio 2022 w wersji 17.1.
Program VS 2022 17.2 obsługiwany w programie Visual Studio 2022 w wersji 17.2.
Program VS 2022 17.3 obsługiwany w programie Visual Studio 2022 w wersji 17.3.
Program VS 2022 17.4 obsługiwany w programie Visual Studio 2022 w wersji 17.4.
Program VS 2022 17.5 obsługiwany w programie Visual Studio 2022 w wersji 17.5.
Uwagi
A W /std:c++14
trybie specyfikacje wyjątków dynamicznych pozostają niezaimplementowane i throw()
nadal są traktowane jako synonim dla programu __declspec(nothrow)
. W języku C++17 specyfikacje wyjątków dynamicznych zostały w większości usunięte przez P0003R5, z wyjątkiem jednej kamizelki: throw()
jest przestarzałe i musi zachowywać się jako synonim dla elementu noexcept
. W /std:c++17
trybie MSVC jest teraz zgodny ze standardem, dając throw()
takie samo zachowanie jak noexcept
, czyli wymuszanie za pośrednictwem zakończenia.
Opcja /Zc:noexceptTypes
kompilatora żąda starego zachowania klasy __declspec(nothrow)
. throw()
Prawdopodobnie zostanie usunięta w przyszłej wersji języka C++. Aby ułatwić migrację kodu w odpowiedzi na te zmiany w implementacji standardu i implementacji firmy Microsoft, nowe ostrzeżenia kompilatora dotyczące problemów ze specyfikacją wyjątków są dodawane w obszarze /std:c++17
i /permissive-
.
B Obsługiwane w /permissive-
trybie w programie Visual Studio 2017 w wersji 15.7. Aby uzyskać więcej informacji, zobacz Two-phase name lookup support comes to MSVC
.
C W programie Visual Studio 2019 w wersji 16.6 lub nowszej kompilator w pełni implementuje standardowy preprocesor C99 za pośrednictwem /Zc:preprocessor
opcji . (W programie Visual Studio 2017 w wersji 15.8 do 16.5 kompilator obsługuje standardowy preprocesor C99 za pośrednictwem opcji kompilatora /experimental:preprocessor
). Ta opcja jest domyślnie włączona, gdy opcja /std:c11
kompilatora lub /std:c17
jest określona.
D Obsługiwane w obszarze /std:c++14
z pomijalnym ostrzeżeniem: C4984
.
E Implementacja jest wystarczająca do obsługi standardowej biblioteki języka C++20. Kompletna implementacja wymaga zmiany powodującej niezgodność binarną.
F Funkcje usunięte po określeniu opcji kompilatora lub nowszego/std:c++17
. Aby ponownie włączyć te funkcje (aby ułatwić przejście do nowszych trybów języka), użyj tych makr: _HAS_AUTO_PTR_ETC
, , _HAS_FUNCTION_ALLOCATOR_SUPPORT
_HAS_OLD_IOSTREAMS_MEMBERS
i _HAS_UNEXPECTED
.
G Biblioteka algorytmów równoległych języka C++17 została ukończona. Ukończone nie oznacza, że każdy algorytm jest równoległy w każdym przypadku. Najważniejsze algorytmy zostały zrównoleglizowane. Podpisy zasad wykonywania są udostępniane nawet wtedy, gdy implementacja nie wykonuje równoległości algorytmów. Centralny nagłówek <yvals_core.h>
wewnętrzny, , zawiera następujące "Parallel Algorithms Notes": C++ umożliwia implementacji implementowanie algorytmów równoległych jako wywołań do algorytmów seryjnych. Ta implementacja zrównalizuje kilka typowych wywołań algorytmów, ale nie wszystkich.
Następujące algorytmy są równoległe:
adjacent_difference
, adjacent_find
, all_of
, any_of
count
count_if
equal
exclusive_scan
find
find_end
find_first_of
find_if
find_if_not
for_each
for_each_n
inclusive_scan
is_heap
is_heap_until
is_partitioned
is_sorted
is_sorted_until
mismatch
none_of
partition
reduce
remove
remove_if
replace
replace_if
search
search_n
set_difference
set_intersection
sort
stable_sort
transform
transform_exclusive_scan
transform_inclusive_scan
transform_reduce
Te algorytmy nie są obecnie równoległe:
- Te algorytmy nie wykazują zauważalnej poprawy wydajności równoległości na sprzęcie docelowym. Wszystkie algorytmy, które tylko kopiują lub permutują elementy bez gałęzi, zwykle mają ograniczoną przepustowość pamięci:
copy
, copy_n
, , , move
rotate_copy
reverse
shift_right
fill_n
reverse_copy
rotate
shift_left
fill
swap_ranges
- W przypadku tych algorytmów istnieją wymagania dotyczące równoległości użytkownika, które prawdopodobnie znajdują się w powyższej kategorii:
- Skuteczne równoległość tych algorytmów może być niewykonalne:
partial_sort
, partial_sort_copy
- Te algorytmy nie zostały jeszcze ocenione. Biblioteka może implementować równoległość w przyszłej wersji:
copy_if
, includes
, , lexicographical_compare
inplace_merge
max_element
merge
min_element
minmax_element
nth_element
partition_copy
remove_copy
remove_copy_if
replace_copy
replace_copy_if
set_symmetric_difference
set_union
stable_partition
unique
unique_copy
H Jest to całkowicie nowa implementacja, niezgodna z poprzednią std::experimental
wersją, wymagana przez obsługę linków symlinkowych, poprawki błędów i zmiany w standardowym zachowaniu. Obecnie udostępnia zarówno nowestd::filesystem
, <filesystem>
jak i poprzednie std::experimental::filesystem
. Nagłówek <experimental/filesystem>
zawiera tylko starą implementację eksperymentalną. Spodziewaj się usunięcia eksperymentalnej implementacji w następnej wersji bibliotek powodującej niezgodność z architekturą ABI.
Ja Obsługiwane przez funkcję wewnętrzną kompilatora.
J std::byte
program jest włączony przez /std:c++17
program lub nowszy, ale ponieważ może powodować konflikt z nagłówkami zestawu Windows SDK w niektórych przypadkach, ma szczegółowe makro rezygnacji. Aby ją wyłączyć, zdefiniuj _HAS_STD_BYTE
jako 0
.
K MSVC nie obsługuje słowa kluczowego _Complex
ani natywnych typów złożonych. Uniwersalne CRT <complex.h>
używa makr specyficznych dla implementacji, aby osiągnąć ten sam efekt. Aby uzyskać więcej informacji, zobacz Obsługa złożonych obliczeń matematycznych w języku C.
L Technologia Universal CRT nie implementuje modyfikatorów konwersji alternatywnej strftime
E
i O
. Te modyfikatory są ignorowane (na przykład %Oe
zachowuje się tak samo jak %e
). Modyfikatory nie są obsługiwane przez bazowe interfejsy API ustawień regionalnych.
M Universal CRT nie implementuje C11aligned_alloc
, ale zapewnia _aligned_malloc
i _aligned_free
. Ponieważ system operacyjny Windows nie obsługuje wyrównanych alokacji, ta funkcja jest mało prawdopodobne, aby została zaimplementowana.
N Deklaracja jest usuwana, ale eksport funkcji pozostaje zgodny z poprzednimi wersjami.
O Niektóre funkcje sprawdzania granic są nieimplementowane lub mają różne podpisy lub nie są częścią standardu C11 lub C17. Te funkcje są nieimplementowane: abort_handler_s
, , ignore_handler_s
, set_constraint_handler_s
memset_s
, snprintf_s
, snwprintf_s
, strerrorlen_s
. vsnwprintf_s
Te funkcje mają różne podpisy: gmtime_s
, , qsort_s
localtime_s
, strtok_s
, vsnprintf_s
, wcstok_s
. Te funkcje nie są wyświetlane w warstwie Standardowa: clearerr_s
, fread_s
.
P Dodano obsługę w programie Visual Studio 2019 w wersji 16.10. Dodano obsługę języka Clang w programie Visual Studio 2022 w wersji 17.0.
Q Spowoduje to usunięcie declare_reachable
, , undeclare_reachable
, declare_no_pointers
, undeclare_no_pointers
. get_pointer_safety
Wcześniej te funkcje nie miały wpływu.
R Jest to powszechna zmiana powodująca niezgodność źródła. Jednak kod, który wcześniej miał niezdefiniowane zachowanie w czasie wykonywania, jest teraz odrzucany z błędami kompilatora.
S Adaptery zakresu wejściowego i counted_iterator
są implementowane w programie VS 2022 17.0. Planowana jest przyszła aktualizacja programu Visual Studio 2019 w wersji 16.11 w celu uwzględnienia tych zmian.
T <stdatomic.h>
program jest obecnie obsługiwany w przypadku kompilacji jako C++ (/std:c++latest
). Nie jest jeszcze obsługiwany podczas kompilowania jako C (/std:c11
i /std:c17
)
14 Te funkcje C++17 i C++20 są zawsze włączone, nawet jeśli /std:c++14
(wartość domyślna) jest określona. Przyczyną jest to, że funkcja została zaimplementowana przed wprowadzeniem /std
opcji lub dlatego, że implementacja warunkowa była niezaprzeczalnie złożona.
17 Te funkcje są włączane przez opcję kompilatora lub nowszego/std:c++17
.
20 W wersjach za pośrednictwem programu Visual Studio 2019 w wersji 16.10 te funkcje są włączone przez opcję kompilatora/std:c++latest
. Program Visual Studio 2019 w wersji 16.11 dodał opcję kompilatora /std:c++20
, aby włączyć te funkcje.
20abi Ze względu na ciągłe prace po wydaniu w standardzie C++20 , <format>
części formatowania (które opierają się na <format>
), oraz fabryki zakresów <chrono>
i adaptery zakresu od <ranges>
(wszystko, co wymaga view
koncepcji) są dostępne tylko w obszarze /std:c++latest
. Spodziewaj się, że te funkcje zostaną /std:c++20
osiągnięte po osiągnięciu porozumienia z usługą WG21, że nie są konieczne żadne dalsze zmiany powodujące niezgodność ABI. Pozostałe części <chrono>
algorytmów i stosowane do zakresów są włączone w /std:c++20
ramach opcji kompilatora w programie Visual Studio 2019 w wersji 16.11 lub nowszej.
23 W programie Visual Studio 2022 w wersji 17.0 i nowszej te funkcje są włączone przez opcję kompilatora/std:c++latest
.
C11 Obsługa kompilatora C11 i C17 wymaga programu Visual Studio 2019 w wersji 16.8 lub nowszej. Z wyjątkiem tego, że obsługa bibliotek C11 i C17 wymaga zestawu Windows SDK kompilacji 10.0.20211.0 lub nowszej. Aby uzyskać więcej informacji na temat sposobu instalowania obsługi C11 i C17, zobacz Instalowanie obsługi C11 i C17 w programie Visual Studio.
DR Te funkcje są włączone we wszystkich trybach opcji kompilatora języka C++/std
. Komitet standardowy języka C++ przyjął tę zmianę jako wsteczny raport o wadach dla języka C++11 i wszystkich nowszych wersji.
2104 Obsługa biblioteki C11 dla tej funkcji wymaga zestawu Windows SDK kompilacji 10.0.20348.0 (wersja 2104) lub nowszej.
Zobacz też
Dokumentacja języka C++
Standardowa biblioteka C++
Ulepszenia zgodności języka C++ w programie Visual Studio
Co nowego w programie Visual C++ w programie Visual Studio
Historia zmian programu Visual C++ od 2003 do 2015
Visual C++ — co nowego od roku 2003 do 2015
Blog zespołu języka C++