- Справочник по стандартной библиотеке C++ C++ Standard Library reference
- Содержание раздела In this section
- Совместное использование кода библиотеки .NET Standard .NET Standard Library code sharing
- Visual Studio для Mac Visual Studio for Mac
- Создание библиотеки .NET Standard Creating a .NET Standard Library
- Изменение параметров библиотеки .NET Standard Editing .NET Standard Library settings
- Visual Studio 2017 (Windows) Visual Studio 2017 (Windows)
- Создание библиотеки .NET Standard Creating a .NET Standard library
- Изменение параметров библиотеки .NET Standard Editing .NET Standard library settings
- Использование проекта библиотеки .NET Standard Using a .NET Standard Library project
- Microsoft C++ language and standard library conformance table
- Compiler features
- Standard library features
Справочник по стандартной библиотеке C++ C++ Standard Library reference
Программа на языке C++ может вызывать множество функций из этой реализации стандартной библиотеки C++. A C++ program can call on a large number of functions from this conforming implementation of the C++ Standard Library. Эти функции выполняют такие службы, как входные и выходные данные, и предоставляют эффективные реализации часто используемых операций. These functions perform services such as input and output and provide efficient implementations of frequently used operations.
Дополнительные сведения о связывании с соответствующим файлом среды выполнения Visual C++ .lib см. в разделе среды выполнения C (CRT) и .lib файлы стандартной библиотеки C++ (STL). For more information about linking with the appropriate Visual C++ runtime .lib file, see C runtime (CRT) and C++ Standard Library (STL) .lib files.
Содержание раздела In this section
Общие сведения о стандартной библиотеке C++ C++ Standard Library overview
Обзор реализации стандартной библиотеки C++ корпорации Майкрософт. Provides an overview of the Microsoft implementation of the C++ Standard Library.
iostream Программирование iostream Programming
Содержит общие сведения о iostream программировании. Provides an overview of iostream programming.
Справочник по файлам заголовков Header files reference
Содержит ссылки на справочные разделы о файлах заголовков стандартной библиотеки C++ с примерами кода. Provides links to reference topics about the C++ Standard Library header files, with code examples.
Совместное использование кода библиотеки .NET Standard .NET Standard Library code sharing
Библиотеки .NET Standard имеют унифицированный API для всех платформ .NET, включая Xamarin и .NET Core. .NET Standard libraries have a uniform API for all .NET Platforms including Xamarin and .NET Core. Создайте единую библиотеку .NET Standard и используйте ее из любой среды выполнения, поддерживающей .NET Standardную платформу. Create a single .NET Standard Library and use it from any runtime that supports the .NET Standard Platform. Дополнительные сведения о поддерживаемых платформах см. в этой диаграмме . Refer to this chart for details of supported platforms.
Хотя .NET Standard версии 1,0 – 1,6 предоставляют инкрементно большие подмножества .NET Framework, .NET Standard 2,0 обеспечивает лучший уровень поддержки для приложений Xamarin и для переноса существующих переносимых библиотек классов. While .NET Standard versions 1.0 through 1.6 provide incrementally larger subsets of the .NET Framework, .NET Standard 2.0 provides the best level of support for Xamarin applications and for porting existing Portable Class Libraries.
Visual Studio для Mac Visual Studio for Mac
В этом разделе описывается создание и использование библиотеки .NET Standard с помощью Visual Studio для Mac. This section walks through how to create and use a .NET Standard Library using Visual Studio for Mac.
Создание библиотеки .NET Standard Creating a .NET Standard Library
Вы можете добавить в решение библиотеку .NET Standard, выполнив следующие действия. You can add a .NET Standard Library to your solution with these steps:
В диалоговом окне Добавление нового проекта выберите категорию .NET Core , а затем выберите .NET Standard библиотека: In the Add New Project dialog, select the .NET Core category and then select .NET Standard Library:
На следующем экране выберите целевую платформу — .NET Standard 2,0 рекомендуется: On the next screen, choose the target framework — .NET Standard 2.0 is recommended:
На последнем экране введите имя проекта и нажмите кнопку создать. On the final screen, type the project name and click Create.
Проект библиотеки .NET Standard будет выглядеть так, как показано на обозреватель решений. The .NET Standard Library project will appear as shown in the Solution Explorer. Узел зависимости будет указывать, что библиотека использует библиотеку NETStandard. Library. The Dependencies node will indicate that the library uses the NETStandard.Library.
Изменение параметров библиотеки .NET Standard Editing .NET Standard Library settings
Параметры библиотеки .NET Standard можно просмотреть и изменить, щелкнув проект правой кнопкой мыши и выбрав Options , как показано на следующем снимке экрана: The .NET Standard Library settings can be viewed and changed by right-clicking on the project and selecting Options as shown in this screenshot:
Внутри можно изменить версию netstandard , изменив Target Framework значение в раскрывающемся списке. Inside you can change your version of netstandard by changing the Target Framework dropdown value.
Кроме того: .csproj Чтобы изменить это значение, можно изменить его напрямую. Additionally: You can edit the .csproj directly to change this value.
Visual Studio 2017 (Windows) Visual Studio 2017 (Windows)
В этом разделе описывается создание и использование библиотеки .NET Standard с помощью Visual Studio. This section walks through how to create and use a .NET Standard Library using Visual Studio.
Создание библиотеки .NET Standard Creating a .NET Standard library
Добавление библиотеки .NET Standard в решение довольно проста. Adding a .NET Standard Library to your solution is fairly straight forward.
В диалоговом окне Новый проект выберите категорию .NET Standard , а затем выберите пункт Библиотека классов (.NET Standard). In the New Project dialog, select the .NET Standard category and then select Class Library (.NET Standard).
Проект библиотеки .NET Standard будет выглядеть так, как показано на обозреватель решений. The .NET Standard Library project will appear as shown in the Solution Explorer. Узел зависимости будет указывать, что библиотека использует библиотеку NETStandard. Library. The Dependencies node will indicate that the library uses the NETStandard.Library.
Изменение параметров библиотеки .NET Standard Editing .NET Standard library settings
Параметры библиотеки .NET Standard можно просмотреть и изменить, щелкнув проект правой кнопкой мыши и выбрав Свойства , как показано на следующем снимке экрана: The .NET Standard Library settings can be viewed and changed by right-clicking on the project and selecting Properties as shown in this screenshot:
Кроме того: Можно изменить непосредственно, .csproj чтобы изменить TargetFramework элемент и изменить целевую версию (например, Additionally: You can edit the .csproj directly to edit the TargetFramework element and change which version is targeted (eg. netstandard2.0 ). netstandard2.0 ).
Использование проекта библиотеки .NET Standard Using a .NET Standard Library project
После создания библиотеки .NET Standard можно добавить ссылку на нее из любого совместимого приложения или проекта библиотеки так же, как обычно добавляются ссылки. Once a .NET Standard Library has been created, you can add a reference to it from any compatible Application or Library project in the same way you normally add references. В Visual Studio щелкните правой кнопкой мыши узел ссылки и выберите команду Добавить ссылку. затем перейдите на вкладку проекты > решение , как показано ниже. In Visual Studio, right-click on the References node and choose Add Reference. then switch to the Projects > Solution tab as shown:
Microsoft C++ language and standard library conformance table
Standards conformance for the Microsoft C++ compiler in Visual Studio (MSVC) is a work in progress. Here’s a summary of our ISO Standard C++ language and library conformance by Visual Studio version. Each compiler and standard library feature name links to the ISO Standard C++ 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 Visual Studio 2017 or Visual Studio 2019 MSVC conformance improvements, see C++ conformance improvements in Visual Studio. For a list of other changes, see What’s New for Visual C++ in Visual Studio. 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 C++ team blog.
There are no binary breaking changes between Visual Studio 2015, Visual Studio 2017, and Visual Studio 2019. For more information, see C++ binary compatibility between Visual Studio 2015, 2017, and 2019
Compiler features
Feature | Supported |
---|---|
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 C |
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 15.0 |
В В N3653 Default member initializers for aggregates | VS 2017 15.0 |
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 15.0 17 |
В В P0184R0 Generalized range-based for-loops | VS 2017 15.0 14 |
В В P0188R1 [[fallthrough]] attribute | VS 2017 15.0 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 D |
В В P0305R1 Selection statements with initializers | VS 2017 15.3 17 |
В В P1381R1 Reference capture of structured bindings | 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.6 |
В В 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 |
C++17 Core language features (Defect reports) | Supported |
В В P0702R1 Fixing class template argument deduction for initializer-list ctors | VS 2017 15.7 17 |
В В P0961R1 Relaxing the structured bindings customization point finding rules | VS 2019 16.0 17 |
В В P0969R0 Allowing structured bindings to accessible members | VS 2019 16.0 17 |
В В P0588R1 Simplifying implicit lambda capture | VS 2019 16.4 17 |
В В P1771R1 [[nodiscard]] for constructors | VS 2019 16.4 17 |
В В P1825R0 Merged wording for P0527R1 and P1155R3, more implicit moves | VS 2019 16.4 17 |
В В P0929R2 Checking for abstract class types | VS 2019 16.5 17 |
В В P0962R1 Relaxing the range-for loop customization point finding rules | VS 2019 16.5 17 |
В В P0859R0 CWG 1581: When are constexpr member functions defined | No |
В В P1009R2 Array size deduction in new-expressions | VS 2019 16.7 17 |
В В P1286R2 Contra CWG DR1778 | VS 2019 16.8 17 |
C++20 Core language features | Supported |
В В P0704R1 Fixing const lvalue ref-qualified pointers to members | VS 2015 14 |
В В P1041R4 Make char16_t/char32_t string literals be UTF-16/32 | VS 2015 14 |
В В P1330R0 Changing the active member of a union inside constexpr | VS 2017 15.0 14 |
В В P0972R0 noexcept For zero(), min(), max() | VS 2017 15.7 14 |
В В P0515R3 Three-way (spaceship) comparison operator | VS 2019 16.0 20 |
В В P0941R2 Feature-test macros | VS 2019 16.0 14 |
В В P1008R1 Prohibiting aggregates with user-declared constructors | VS 2019 16.0 20 |
В В P0329R4 Designated initialization | VS 2019 16.1 20 |
В В P0846R0 ADL and function templates that are not visible | VS 2019 16.1 20 |
В В P0409R2 Allowing lambda-capture [=, this] | VS 2019 16.2 20 |
В В P0428R2 Familiar template syntax for generic lambdas | VS 2019 16.2 20 |
В В P0624R2 Default constructible and assignable stateless lambdas | VS 2019 16.2 20 |
В В P0780R2 Allowing pack expansion in lambda init-capture | VS 2019 16.2 20 |
В В P0806R2 Deprecate implicit capture of this via [=] | VS 2019 16.2 20 |
В В P1120R0 Consistency improvements for and other comparison operators | VS 2019 16.2 20 |
В В P1185R2 != == | VS 2019 16.2 20 |
В В P0734R0 Concepts | VS 2019 16.3 20 |
В В P0857R0 Fixing functionality gaps in constraints | VS 2019 16.3 20 |
В В P1084R2 Today’s return-type-requirements are insufficient | VS 2019 16.3 20 |
В В P0892R2 Conditional explicit | VS 2019 16.4 20 |
В В P1091R3 Extending structured bindings to be more like variable declarations | VS 2019 16.4 20 |
В В P1099R5 Using enum | VS 2019 16.4 20 |
В В P1186R3 When do you actually use | VS 2019 16.4 20 |
В В P1630R1 Spaceship needs a tune-up | VS 2019 16.4 20 |
В В P0306R4 Adding __VA_OPT__ for comma omission and comma deletion | VS 2019 16.5 20 |
В В P0614R1 Range-based for-loops with initializers | VS 2019 16.5 20 |
В В P0683R1 Default member initializers for bit-fields | VS 2019 16.5 20 |
В В P1002R1 try-catch blocks in constexpr functions | VS 2019 16.5 20 |
В В P1161R3 Deprecate uses of the comma operator in subscripting expressions | VS 2019 16.5 20 |
В В P1301R4 [[nodiscard(«message»)]] | VS 2019 16.5 20 |
В В P1703R1 Recognizing header unit imports requires full preprocessing | VS 2019 16.5 20 |
В В P1946R0 Allow defaulting comparisons by value | VS 2019 16.5 20 |
В В P0479R5 [[likely]] and [[unlikely]] attributes | VS 2019 16.6 20 |
В В P0692R1 Relaxing access checking on specializations | VS 2019 16.6 14 |
В В P0732R2 Class types in non-type template parameters | VS 2019 16.6 20 |
В В P1139R2 Address wording issues related to ISO 10646 | VS 2019 16.6 14 |
В В P1907R1 Inconsistencies with non-type template parameters | VS 2019 16.6 20 |
В В P1971R0 US053: Mandate the return type for return_void and return_value to be void | VS 2019 16.6 20 |
В В P1971R0 US065: Apply Coroutines issue 24 from P0664R8 | VS 2019 16.6 20 |
В В P1979R0 Resolution to US086 | VS 2019 16.6 20 |
В В P0388R4 Permit conversions to arrays of unknown bound | VS 2019 16.7 20 |
В В P0466R5 Layout-compatibility and Pointer-interconvertibility Traits | VS 2019 16.7 20 |
В В P0722R3 Efficient sized delete for variable sized classes | VS 2019 16.7 20 |
В В P1094R2 Nested inline namespaces | VS 2019 16.7 20 |
В В P1152R4 Deprecating volatile | VS 2019 16.7 20 |
В В P1331R2 Permitting trivial default initialization in constexpr contexts | VS 2019 16.7 20 |
В В P1358R0 2310: Type completeness and derived-to-base pointer conversions | VS 2019 16.7 20 |
В В P1452R2 On the non-uniform semantics of return-type-requirements | VS 2019 16.7 20 |
В В P1616R1 Using unconstrained TTPs with constrained templates | VS 2019 16.7 20 |
В В P1814R0 CTAD for alias templates | VS 2019 16.7 20 |
В В P1816R0 CTAD for aggregates | VS 2019 16.7 20 |
В В P1957R1 Converting from T* to bool should be considered narrowing (re: US 212) | VS 2019 16.7 DR |
В В P1968R0 CWG 2282: Consistency with mismatched aligned/non-over-aligned allocation/deallocation functions | VS 2019 16.7 20 |
В В P1969R0 CWG 2280: Matching a usual deallocation function with placement new | VS 2019 16.7 20 |
В В P1969R0 CWG 2382: Array allocation overhead for non-allocating placement new | VS 2019 16.7 20 |
В В P1969R0 CWG 2441: Inline function parameters | VS 2019 16.7 20 |
В В P1971R0 US052: Non-executed return statements in coroutines | VS 2019 16.7 20 |
В В P1972R0 US105: Check satisfaction of constraints for non-templates when forming pointer to function | VS 2019 16.7 20 |
В В P1980R0 CA096: Declaration matching for non-dependent requires-clauses | VS 2019 16.7 20 |
В В P2082R1 Fixing CTAD for aggregates | VS 2019 16.7 20 |
В В P2085R0 Consistent defaulted comparisons | VS 2019 16.7 20 |
В В P2103R0 US033: Allow «import» inside linkage-specifications | VS 2019 16.7 20 |
В В P2107R0 US064: Copy semantics of coroutine parameters | VS 2019 16.7 20 |
В В P0912R5 Coroutines | VS 2019 16.8 20 |
В В P1103R3 Modules | VS 2019 16.8 20 |
В В P0315R4 Allowing lambdas in unevaluated contexts | VS 2019 16.8 20 |
В В P0848R3 Conditionally trivial special member functions | VS 2019 16.8 20 |
В В P0960R3 Allow initializing aggregates from a parenthesized list of values | VS 2019 16.8 20 |
В В P1766R1 Mitigating minor modules maladies | VS 2019 16.8 20 |
В В P1811R0 Relaxing redefinition restrictions for re-exportation robustness | VS 2019 16.8 20 |
В В P1874R1 Dynamic Initialization Order of Non-Local Variables in Modules | VS 2019 16.8 20 |
В В P1975R0 Fixing the wording of parenthesized aggregate-initialization | VS 2019 16.8 20 |
В В P0784R7 More constexpr containers | VS 2019 16.9 20 |
В В P1141R2 Yet another approach for constrained declarations | VS 2019 16.9 20 |
В В P1668R1 Permitting unevaluated inline assembly in constexpr functions | VS 2019 16.9 20 |
В В P0641R2 const mismatch with defaulted copy constructor | Partial |
В В P0634R3 Down with typename! | No |
В В P0840R2 [[no_unique_address]] attribute | No |
В В P1064R0 Allowing virtual function calls in constant expressions | No |
В В P1073R3 Immediate functions | No |
В В P1143R2 constinit | No |
В В P1327R1 Allowing dynamic_cast, polymorphic typeid in constant expressions | No |
В В P1353R0 Missing feature-test macros | No |
В В P0735R1 Interaction of memory_order_consume with release sequences | N/A |
В В P1236R1 Signed integers are two’s complement | N/A |
Standard library features
A more detailed listing of Standard Library features and bug fixes by product version is available on the GitHub Microsoft STL wiki Changelog page.