Skip to content

StandardUsing.en US

FrankHB edited this page Sep 24, 2014 · 48 revisions

Introduction

This is the page concerning which subset of the standard features could be used in this project.

Several C++0x features are used since 2011-05-03, build 206. These features are also in ISO C++11(ISO/IEC 14882:2011).

C++11 is now default to conform. All C++03 features conflicted with C++11 are forbidden.

However, the codebase is still largely based on C++03(ISO/IEC 14882:2003).

Following are the features introduced explicitly to clearify dependences on the language implementations.

Details

C++11 core language features and headers below now could be used.

See Documentation::Designation[Designation.txt, zh-CN] @ 1.3.2.1 .

New headers from C++11 used:

  • <array> (since b218[2011-06-14])
  • <chrono> (since b291[2012-03-07])
  • <forward_list> (since b218[2011-06-14])
  • <type_traits> (since b206[2011-05-03])
  • <tuple> (since b206[2011-05-03])
  • <system_error> (since b476[2014-02-16])
  • <unordered_map> (since b206[2011-05-03])
  • <unordered_set> (since b206[2011-05-03])

For all implementations supporting multithreading, these headers are also used:

  • <atomic> (since b328[2011-07-25]; for platform MinGW32 since b299[2013-04-08])
  • <condition_variable> (since b328[2011-07-25]; for platform MinGW32 since b299[2013-04-08])
  • <future> (since b520[2014-07-23])
  • <mutex> (since b328[2011-07-25]; for platform MinGW32 since b299[2013-04-08])
  • <thread> (since b328[2011-07-25]; for platform MinGW32 since b299[2013-04-08])

Note: LWG1360 specified single-threaded program should be able to use <atomic>, and resolved by N3256. However, the current YSLib doesn't require it for single-threaded programs.

Other C++11 core and library features used:

  • CWG226: Default template arguments for function templates (since b387[2013-03-11])
  • LWG534: Missing basic_string members (since b315[2012-06-08])
  • LWG1040: Clarify possible sameness of associative container's iterator and const_iterator (since b496[2014-05-01])
  • LWG1255: declval should be added to the library (since b260[2011-11-14])
  • LWG1382: pair and tuple constructors should forward arguments (since b206[2011-05-03])
  • N1653: Working draft changes for C99 preprocessor synchronization (since b257[2011-11-04]; used GCC extensions previously)
  • N1720: Proposal to Add Static Assertions to the Core Language (Revision 3) (since b206[2011-05-03])
  • N1757: Right Angle Brackets (Revision 1) (since b206[2011-05-03])
  • N1811: Adding the long long type to C++ (Revision 3) (since b206[2011-05-03])
  • N1836: Draft Technical Report on C++ Library Extensions (Built-in type traits) (since b206[2011-05-03])
  • cbegin/cend/crbegin/crend from N1913: A Proposal to Improve const_iterator Use (version 2) (since b206[2011-05-03])
  • auto-typed variables from N1984: Deducing the type of variable from its initializer expression (revision 4) (since b206[2011-05-03])
  • N1986: Delegating Constructors (revision 3) (since b311[2011-05-25])
  • N1987: Adding "extern template" (version 2) (since b206[2011-05-03])
  • N2235: Generalized Constant Expressions—Revision 5 (since b246[2011-09-23])
  • N2242: Proposed Wording for Variadic Templates (Revision 2) (since b251[2011-10-08])
  • N2249: New Character Types in C++ (since b253[2011-10-18])
  • N2258: Templates Aliases (since b433[2013-08-01])
  • N2343: Decltype (revision 7) (since b206[2011-05-03])
  • N2346: Defaulted and Deleted Functions (since b207[2011-05-05])
  • N2347: Strongly Typed Enums (revision 3) (since b261[2011-11-19])
  • N2350: Container insert/erase and iterator constness (Revision 1) (since b531[2014-08-31])
  • N2431: A name for the null pointer: nullptr (revision 4) (since b206[2011-05-03]; compatible layer introduced since b204[2011-04-26])
  • N2437: Explicit Conversion Operator Draft Working Paper (revision 3) (since b260[2011-11-15])
  • Unicode string literals from N2442: Raw and Unicode String Literals; Unified Proposal (Rev. 2) (since b253[2011-10-18])
  • N2442: Raw and Unicode String Literals; Unified Proposal (Rev. 2) (since b434[2013-08-04])
  • N2535: Namespace Association ("inline namespace") (since b427[2013-07-11])
  • N2540: Inheriting Constructors (revision 5) (since b538[2014-09-24])
  • N2541: New Function Declarator Syntax Wording (since b207[2011-05-05])
  • N2559: Nesting Exception Objects (Revision 1) (since b477[2014-02-19])
    • CWG819: rethrow_if_nested (since b477[2014-02-19])
  • N2672: Initializer List proposed wording (since b297[2012-03-27])
  • N2756: Non-static data member initializers (since b360[2013-04-29])
  • N2844: Fixing a Safety Problem with Rvalue References: Proposed Wording (Revision 1) (since b206[2011-05-03])
    • CWG1138: Rvalue-ness check for rvalue reference binding is wrong (since b206[2011-05-03])
  • N2927: New wording for C++0x Lambdas (rev. 2) (since b206[2011-05-03])
  • N2930: Range-Based For Loop Wording (Without Concepts) (since b316[2011-06-11])
  • N3052: Converting Lambdas to Function Pointers (since b360[2012-12-07])
  • N3143: Proposed wording for US 90 (since b206[2011-05-03])
  • features except in <type_traits> from N3053: Defining Move Special Member Functions (since b230[2011-08-07])
  • N3272: Follow-up on override control (since b311[2011-05-25])
Clone this wiki locally