Skip to content

StandardUsing.en US

FrankHB edited this page Jan 15, 2016 · 48 revisions

Introduction

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

Unless otherwise specified, date is in UTC+8.

"NOTE" in capital case indicates note for maintainers and is not directly from the source of the relative contents.

Basic rules

The Forwarding Compatibility Rule: All language features not compatible with published/normative future versions of language specification are disallowed to use.

The Baseline Implementation Rule: Each feature being used shall have been implemented in general available version of at least 2 FOSS implementations.

General status

The default configuration, baseline, is specified here. The features introduced explicitly to clearify dependences on the language implementations are also listed in this and following sections.

Several C++0x features are used since 2011-05-03, build 206. These features are also in ISO C++11(ISO/IEC 14882:2011). Previously C++03 with TR1(ISO/IEC TR 19768:2007) was used. However, the codebase is still largely based on C++03(ISO/IEC 14882:2003).

Baseline

C++11 is now default to conform.

As per the forwarding compatibility rule, all C++03 features conflicted with future versions of C++ (e.g. export) are forbidden.

TR1 features are avoided and have been substituted by their C++11 counterparts.

Exceptions

As complement of implementations, LibDefect in YBase might have implementation-specific contents. However, they are intended for only internal use and would still guarded by conditional inclusion. The public headers shall be able used directly with each implementations meets requirements specified here.

Evolution

For compatibility, not all of the whole project use same set of rules. That is, YBase is more stable and conservative to utilize new C++ features.

Longterm policy

  • For ydef.h, for compatibility reasons, only a subset of C++11 would be mandated. The precise subset is unspecified and can vary between revisions.
  • For YBase except LibDefect discussed above, library features beyond C++11 would be used only available.
  • For other parts of the YSLib project, C++ features would be used aggressively (but still restrictd by the rules here, esp. the basic rules).

Core language compatibility features

Some core language feature have be fallback in C++03 (e.g. constexpr) or library (e.g. alignof), mostly workaround in ydef.h, as well as some optional extensions (e.g. __has_feature and __builtin_expect) wrapped as implementation details.

Library compatibility features

To reduce impact on user code to adopt new language standards, several post-C++03 library features are implementated in namespace ystdex (with inlined namespace if the features have been adopted by published standards), either by using declarations from namespace std iff. provided by the standard library, or being implemented from scratch when the features are not available from the standard library (not the library implementation, i.e. implementation-specific interface are still forbidden).

They are designed to be drop-in replacement of corresponding specific version of std interface, with exception of argument dependent lookup on namespace std. YBase user code can use ystdex instead of std counterparts to simplify migration.

Reviewed

The following editor report has been fully reviewed (b593[2015-04-23]), which means all the resolutions in the paper are categorized in the following clauses:

NOTE There might exist minor differences between editor's report and the paper in the list, e.g. N3059 (rev 5.2) in N3091 is (rev 5.1). For these cases, only the later revisions at the point of time are reviewed and probably would not be updated unless necessary.

To be done

Reviewing of following defect reports and resolutions are work in progress.

  • CWG215: Template parameters are not allowed in nested-name-specifiers
  • CWG218: Specification of Koenig lookup (see also CWG113 and CWG143)
  • CWG397: Same address for string literals from default arguments in inline functions?
  • CWG667: Trivial special member functions that cannot be implicitly defined
  • CWG1135: Explicitly-defaulted non-public special member functions
    • CWG1136: Explicitly-defaulted explicit constructors
    • CWG1140: Incorrect redefinition of POD class
    • CWG1145: Defaulting and triviality
    • CWG1149: Trivial non-public copy operators in subobjects
    • CWG1208: Explicit noexcept in defaulted definition

Reviewing of following editor reports are work in progress.

The following issues are being waiting to be resolved (and then be reviewed here) formally in public standards.

  • CWG943: Is T() a temporary?
  • N3918 Core Issue 1299: Temporary objects vs temporary expressions
    • CWG1299: “Temporary objects” vs “temporary expressions”
      • CWG1651: Lifetime extension of temporary via reference to subobject
      • CWG1893: Function-style cast with braced-init-lists and empty pack expansions
    • CWG1300
  • CWG1661: Preservation of infinite loops
  • CWG1722: Should lambda to function pointer conversion function be noexcept?

No actions

There are nothing to do of coding and further documentations for some resolutions.

In baseline

These issues are resolved as NAD(not a defect) and thus have been rejected by WG21 in baseline.

  • CWG37: When is uncaught_exception() true?
  • CWG61: Address of static member function "&p->f"
  • CWG109: Allowing ::template in using-declaration​s
  • CWG130: Sequence points and new-expression​s
  • CWG622: Relational comparisons of arbitrary pointers (see EWG91)
  • LWG84: Ambiguity with string::insert()
  • EWG91: [tiny] Core issue 622, Relational comparisons of arbitrary pointers

These resolutions are already adopted as TC1(Technical Corrigendum 1), i.e. in C++03, and still effective in later versions of the standard.

  • CWG30: Valid uses of "::template"
  • CWG84: Overloading and conversion loophole used by auto_ptr
  • CWG137: static_cast of cv void*
  • LWG61: Exception-handling policy for unformatted output
  • N1219: PROPOSED RESOLUTION TO LIBRARY ISSUE 60
    • LWG60: What is a formatted input function?

Not related to user code

These issues are resolved as NAD(not a defect) editorial and thus nothing to do for user code:

  • CWG1384: reinterpret_cast in constant expressions
  • CWG1415: Change "declararation or definition" to "declaration"
  • CWG1520: Alias template specialization vs pack expansion (see also CWG1558)
  • LWG580: unused allocator members
  • P0134R0: Introducing a name for brace-or-equal-initializer​s for non-static data members

These post-C++03 draft resolutions are purely editorial or conceptional, so no actions could be taken (revised b645[2015-10-13]):

  • CWG113: Visibility of called function
  • CWG119: Object lifetime and aggregate initialization
  • CWG357: Definition of signature should include name
  • CWG404: Unclear reference to construction with non-trivial constructor (NOTE superseded by "non-vacuous initialization" wording in working draft)
  • CWG413: Definition of "empty class"
  • CWG452: Wording nit on description of this, partially adopted
  • CWG538: Definition and usage of structure, POD-struct, POD-union, and POD class
    • CWG327: Use of "structure" without definition
  • CWG582: Template conversion functions
  • CWG594: Coordinating issues 119 and 404 with delegating constructors (see CWG119 and CWG404)
  • CWG618: Casts in preprocessor conditional expressions
  • CWG627: Values behaving as types
  • LWG628: Inconsistent definition of basic_regex constructor
  • LWG640: 27.6.2.5.2 does not handle (unsigned) long long (i.e. for ostream::operator<<), outdated
  • LWG972: The term "Assignable" undefined but still in use
  • N2775: Small library thread-safety revisions
  • N3026
    • CWG999: “Implicit” or “implied” object argument/parameter?

These post-C++03 draft resolutions would never be depended on because they are only intended useful for language implementations and there shall be no compatibility problems for conforming code (revised b593[2015-04-23]):

  • N2194: decltype for the C++0x Standard Library

Outdated

These resolutions are only about TR1 or features have been formally deprecated/removed from current ISO C++, so shall never be depended on:

  • LWG527: tr1::bind has lost its Throws clause
  • LWG588: requirements on zero sized tr1::arrays and other details (for std::array, resolved by LWG776)

These resolutions are duplicate:

  • CWG1300: T() for array types (duplicate of CWG914)
  • CWG1568: Temporary lifetime extension with intervening cast (duplicate of CWG1376)
  • LWG479: Container requirements and placement new (duplicate of LWG580)
  • LWG486: min/max CopyConstructible requirement is too strict (duplicate of LWG281)

These papers are superseded and newer revisions have been reviewed, so no further actions would be taken:

  • N2192: Variadic Templates for the C++0x Standard Library (Revision 1) (see N2242)
  • N2550: Lambda Expressions and Closures: Wording for Monomorphic Lambdas (Revision 4) (see N2927)
  • N2635: Local and Unnamed Types as Template Arguments (see N2657)
  • N2778: Wording for range-based for-loop (revision 4) (see N2930)
  • N3149: From Throws: Nothing to noexcept (see N3195)
  • N3248: noexcept Prevents Library Validation (see N3279)
  • N3727: A proposal to add invoke function template (see N4169)
  • N4017: Non-member size() and more (see N4155)
  • N4151: TriviallyCopyable reference_wrapper (see N4277)
  • N4155: Non-member size() and more (Revision 1) (see N4280)

These features are still under development but the approved versions are superseded (note that the superseded versions may still newer than currently adopted version):

  • EWG22: N4030, 3745, N3694 Feature-testing recommendations for C++, N3435 Standardized feature-test macros (for adopted version, see N4200)
    • N3435: Standardized feature-test macros
    • N3694: Feature-testing recommendations for C++
    • N3745: Feature-testing recommendations for C++
    • N4030: Feature-testing recommendations for C++
  • Feature Testing study group documents after EWG22 (for adopted version, see N4200)
    • N4440: eature-testing recommendations for C++
    • See also N4535 tentativelly adopted below

Revoked

These features were once adopted by the working paper but later removed away, so no actions would be taken until introduced to the draft again:

  • LWG1029: Specialized algorithms for memory management need to be concept-constrained templates
  • LWG1001: Pointers, concepts and headers (see LWG1178)
  • N2525: Allocator-specific Swap and Move Behavior (i.e. allocator_propagate_*)
  • N2620: Concepts for the C++0x Standard Library: Diagnostics library
  • N2736: Concepts for the C++0x Standard Library: Numerics (Revision 3)
  • N2755: Concepts for the C++0x Standard Library: Chapter 17 -Introduction (Revision 2)
  • N2758: Iterator Concepts for the C++0x Standard Library (Revision 5)
  • N2759: Concepts for the C++0x Standard Library: Algorithms (Revision 5)
  • N2768: Allocator Concepts, part 1 (revision 2)
  • N2770: Concepts for the C++0x Standard Library: Utilities (Revision 5)
  • N2773: Proposed Wording for Concepts (Revision 9)
  • N2774: Foundational Concepts for the C++0x Standard Library (Revision 5)
  • N2776: Concepts for the C++0x Standard Library: Containers (Revision 4)
  • N2777: Concepts for the C++0x Standard Library: Iterators (Revision 4)
  • N2779: Concepts for Clause 18: Part 2
  • N2780: Named Requirements for C++0X Concepts, version 2
  • N2786: Simplifying unique_copy (Revision 1)

There are actions taken by the committee to remove away some former working draft features which are never used here:

  • N2549: Excision of Clause 31 (i.e. <date_time>)

Non defects

  • LWG466: basic_string ctor should prevent null pointer error
  • LWG1202: integral_constant needs a spring clean

Not applicable

Some proposals are not approved.

  • N3400: A proposal for eliminating the underscore madness that library writers have to suffer

Some proposals are not applicable yet and to be resolved in future. There also may be workaround provided by C++ implementation extensions or user code.

  • N2683: issue 454: problems and solutions
    • LWG454: basic_filebuf::open should accept wchar_t names

Adopted changes

C++11 core language features and headers below now are being used.

Imported TR1 Headers

TR1(see N1836) headers imported to C++11 are used:

  • <array> (since b218[2011-06-14])
  • <type_traits> (since b206[2011-05-03])
  • <tuple> (since b206[2011-05-03])
    • with LWG1382: pair and tuple constructors should forward arguments
    • with LWG1384: Function pack_arguments is poorly named (i.e. forward_as_tuple; since b206[2011-05-03])
    • with N2244: Wording for decay, make_pair and make_tuple
    • with N2299: Concatenating tuples, with modification (since b303[2012-04-23])
  • <unordered_map> (since b206[2011-05-03])
  • <unordered_set> (since b206[2011-05-03])

Headers

New non-TR1 headers from C++11 are used:

  • <atomic> (for all platforms from b590[2015-04-03]; for platforms supporting multithreading since b328[2011-07-25]; for platform MinGW32 since b299[2013-04-08])
  • <chrono> (since b291[2012-03-07])
  • <forward_list> (since b218[2011-06-14]; see N2543)
  • <typeindex> (since b468[2014-01-20])
  • <system_error> (since b476[2014-02-16]; see N2241)

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

  • <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.

Technicle Reports

TR1 features was once used, but now retired and corresponding ISO C++ features shall be used, since they are imported from TR1:

  • TR1 <type_traits> including metafunctions and std::tr1::aligned_storage (since b175[2010-12-23])

Adopted features

The conformance of following clearer specification (and possible stronger restrictions to user code) beyond C++03 are concerned and took into account:

  • CWG96: Syntactic disambiguation using the template keyword
  • LWG294: User defined macros and standard headers
  • LWG420: is std::FILE a complete type?

C++11 library features used indirectly (not required, but with design in mind that could make more interface usable, e.g. macro substitution or template instantiations):

  • N2761: Towards support for attributes in C++ (Revision 6)

Other C++11 core and library features used directly:

  • CWG45: Access to nested classes (since b273[2012-01-01])
    • CWG8: Access to template arguments used in a function return type and in the nested name specifier
    • CWG10: Can a nested class access its own class name as a qualified name if it is a private member of the enclosing class?
  • CWG208: Rethrowing exceptions in nested handlers (since b461[2013-12-23])
  • CWG226: Default template arguments for function templates (since b387[2013-03-11])
  • CWG254: Exception types in clause 19 are constructed from std::string (since b643[2015-10-08]; i.e. const char* parameter in constructor of standard exception classes)
  • CWG339: Overload resolution in operand of sizeof in constant expression (since b591[2015-04-10])
  • CWG382: Allow typename outside of templates (b421[2013-07-03])
  • CWG637: Sequencing rules and example disagree (since b297[2012-03-27])
    • CWG222: Sequence points and lvalue-returning operators
  • CWG1104: Global-scope template arguments vs the <: digraph (since b493[2014-04-16])
  • LWG49: Underspecification of ios_base::sync_with_stdio (since b565[2015-01-16])
  • LWG91: Description of operator>> and getline() for string<> might cause endless loop (since b663[2015-12-18])
  • LWG376: basic_streambuf semantics (since b616[2015-07-21])
  • LWG534: Missing basic_string members (since b315[2012-06-08])
  • LWG596: 27.8.1.3 Table 112 omits "a+" and "a+b" modes (since b326[2012-07-19])
  • LWG762: std::unique_ptr requires complete type? (since b238[2011-09-07])
  • CWG765: Local types in inline functions with external linkage (since b282[2012-02-04])
  • LWG771: Impossible throws clause in [string.conversions] (since b375[2013-01-22])
  • LWG772: Impossible return clause in [string.conversions] (since b375[2013-01-22])
  • LWG806: unique_ptr::reset effects incorrect, too permissive (since b206[2011-05-03])
  • LWG809: std::swap should be overloaded for array types (since b620[2015-08-02])
  • LWG817: bind needs to be moved (since b401[2013-05-02])
  • LWG922: [func.bind.place] Number of placeholders (since b437[2013-08-22])
  • LWG929: Thread constructor (since b384[2013-03-01])
  • LWG993: _Exit needs better specification (since b565[2015-01-16])
  • LWG1019: Make integral_constant objects useable in integral-constant-expression​s (since b590[2015-04-10])
  • LWG1040: Clarify possible sameness of associative container's iterator and const_iterator (since b496[2014-05-01])
  • LWG1178: Header dependencies (since b338[2012-09-13])
    • LWG343: Unspecified library header dependencies (see also N2259)
  • LWG1192: basic_string missing definitions for cbegin / cend / crbegin / crend (since b546[2014-10-17])
  • 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])
  • N1626: Proposed Resolution for Core Issue 39 (Rev. 1) (since b447[2013-09-25])
    • CWG39: Conflicting ambiguity rules
  • N1653: Working draft changes for C99 preprocessor synchronization (since b257[2011-11-04]; used GCC extensions previously for variadic macros and empty macro arguments only)
  • N1720: Proposal to Add Static Assertions to the Core Language (Revision 3) (since b206[2011-05-03])
    • with CWG676: static_assert-declaration​s and general requirements for declarations
  • 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])
  • N1822: A Proposal to add a max significant decimal digits value to the C++ Standard Library Numeric limits (since b260[2011-11-12]; i.e. numeric_limits::max_digits10)
  • N1836: Draft Technical Report on C++ Library Extensions (Built-in type traits) (since b206[2011-05-03])
    • with LWG1270: result_of should be moved to <type_traits> (since b245[2011-09-23])
  • cbegin/cend/crbegin/crend from N1913: A Proposal to Improve const_iterator Use (version 2) (since b206[2011-05-03])
  • N1858: Rvalue Reference Recommendations for Chapter 23, reworded (since b216[2011-06-08])
  • N1984: Deducing the type of variable from its initializer expression (revision 4) (since b206[2011-05-03]; i.e. auto-typed variables)
  • N1986: Delegating Constructors (revision 3) (since b311[2011-05-25])
  • N1987: Adding "extern template" (version 2) (since b206[2011-05-03])
  • N2179: Language Support for Transporting Exceptions between Threads (since b538[2014-09-28]; i.e. exception_ptr and current_exception, etc)
    • with LWG829: current_exception wording unclear about exception type
    • with LWG1130: copy_exception name misleading (i.e. make_exception_ptr; since b550[2014-11-04])
    • with N3195: From Throws: Nothing to noexcept (version 2)
  • N2235: Generalized Constant Expressions—Revision 5 (since b246[2011-09-23]; i.e. constexpr)
  • N2238: Minimal Unicode support for the standard library (revision 3) (since b253[2011-10-18])
  • N2239: A finer-grained alternative to sequence points (revised) (since b297[2012-03-27]; notably order of aggregate initialization, see also CWG1030)
  • N2240: Two missing traits: enable_if and conditional, added specification when B is false (since b206[2011-05-03])
  • N2241: Diagnostics Enhancements for C++0x (Rev. 1), reworded (since b476[2014-02-16]; i.e. <system_error>)
    • with LWG805: posix_error::posix_errno concerns (since b550[2014-11-04]; i.e. errc)
  • N2242: Proposed Wording for Variadic Templates (Revision 2) (since b251[2011-10-08])
  • N2244: Wording for decay, make_pair and make_tuple (since b206[2011-05-03])
  • features from N2246: 2 of the least crazy ideas for the standard library in C++0x (i.e. next/prev/is_sorted_until/is_heap_until)
    • next/prev (since b375[2013-01-22])
  • N2249: New Character Types in C++, library part reworded (since b253[2011-10-18])
  • N2255: Minor Modifications to the type traits Wording Revision 2, reworded (since b206[2011-05-03])
  • N2258: Templates Aliases (since b433[2013-08-01])
  • N2259: Specify header dependency for <iostream> (since b338[2012-09-13]; see also LWG343)
  • features(e.g. alignof) from N2341: Adding Alignment Support to the C++ Programming Language / Wording
    • std::aligned_storage used instead of std::tr1::aligned_storage since b206[2011-05-03]
    • other features except std::aligned_union used since b315[2012-06-08]
  • N2342: POD's Revisited; Resolving Core Issue 568 (Revision 5) (since b206[2011-05-03])
    • CWG568: Definition of POD is too strict
  • N2343: Decltype (revision 7) (since b206[2011-05-03])
  • N2345: Placement Insert for Containers (Revision 2) (since b286[2012-02-19])
  • N2346: Defaulted and Deleted Functions (since b207[2011-05-05])
  • N2347: Strongly Typed Enums (revision 3), with modification (since b261[2011-11-19])
  • N2348: Wording for std::numeric_limits<T>::lowest() (since b242[2011-09-16])
  • N2349: Constant Expressions in the Standard Library — Revision 2, with modification (since b260[2011-11-12])
  • 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])
  • N2439: Extending move semantics to *this (revised wording) (since b591[2015-04-11])
  • N2442: Raw and Unicode String Literals; Unified Proposal (Rev. 2)
    • unicode string literals used since b253[2011-10-18]
    • other features used since b434[2013-08-04]
  • N2530: Making It Easier to Use std::type_info as an Index in an Associative Container (since b468[2014-01-20]; i.e. type_info::hash_code)
  • 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])
  • N2543: STL singly linked lists (revision 3) (since b218[2011-06-04]; i.e. <forward_list>)
  • N2544: Unrestricted Unions (Revision 2) (since b569[2015-01-29])
  • N2546: Removal of auto as a storage-class specifier (since b206[2011-05-03])
    • CWG629: auto parsing ambiguity
  • N2559: Nesting Exception Objects (Revision 1) (since b477[2014-02-19])
    • CWG819: rethrow_if_nested (since b477[2014-02-19])
  • N2634: Solving the SFINAE problem for expressions (since b591[2015-04-10])
    • CWG339: Overload resolution in operand of sizeof in constant expression
  • N2657: Local and Unnamed Types as Template Arguments (since b206[2011-05-03])
    • CWG488: Local types, overload resolution, and template argument deduction
    • with CWG765 above
  • N2659: Thread-Local Storage (since b425[2013-07-08])
    • with CWG810: Block-scope thread_local variables should be implicitly static (since b425[2013-07-08])
  • N2672: Initializer List proposed wording (since b297[2012-03-27])
    • CWG1030: Evaluation order in initializer-lists used in aggregate initialization (since b297[2012-03-27]; see also N2239)
  • N2709: Packaging Tasks for Asynchronous Execution (since b520[2014-07-23]; i.e. packaged_task)
  • N2756: Non-static data member initializers (since b360[2013-04-29])
  • N2764: Forward declaration of enumerations (rev. 3) (since b658[2015-12-08])
  • 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 b212[2011-05-27])
  • N2930: Range-Based For Loop Wording (Without Concepts) (since b316[2011-06-11])
  • features from N2982: Allocators post Removal of C++ Concepts (Rev 1)
    • std::addressof used since b288[2012-02-26]
    • std::allocator_traits used since b592[2015-04-19]
  • N3050: Allowing Move Constructors to Throw (Rev. 1) (since b319[2012-06-24]; i.e. noexcept and std::move_if_noexcept)
  • N3052: Converting Lambdas to Function Pointers (since b360[2012-12-07])
  • features except in <type_traits> from N3053: Defining Move Special Member Functions (since b230[2011-08-07])
  • N3143: Proposed wording for US 90 (since b206[2011-05-03])
  • N3189: Observers for the three handler functions (since b550[2014-11-04])
  • N3180: More on noexcept for the Strings Library (since b329[2012-08-05])
    • with nothing would be confilict to N3279
  • N3272: Follow-up on override control (since b311[2011-05-25])
  • N3279: Conservative use of noexcept in the Library (since b461[2013-12-23])

Tentatively applied

All adopted changes are confirmed being included in the newest working paper and would not be removed in future unless they are not in the working paper or published standard any longer.

Some C++11 features are not requried to reduce compatibility impact on implementations, but can be utilized when available, i.e. used conditionally:

  • LWG911: I/O streams and move/swap semantic (since b620[2015-08-01])
  • N2340: C99 Compatibility : __func__ and predeclared identifiers (revision 2) (since b638[2015-09-24])

The conformance of following clearer specification (and possible stronger restrictions to user code) beyond C++11 are concerned and took into account:

  • CWG1227: Mixing immediate and non-immediate contexts in deduction failure
  • CWG1376: static_cast of temporary to rvalue reference
  • CWG1493: Criteria for move-construction
  • CWG1570: Address of subobject as non-type template argument
  • CWG1596: Non-array objects as array[1]
  • CWG1629: Can a closure class be a literal type?
  • CWG1672: Layout compatibility with multiple empty bases
  • CWG1885: Return value of a function is underspecified
  • N3436: std::result_of and SFINAE

The conformance of following clearer drafting specification (and possible stronger restrictions to user code) beyond C++14 (with Ready state for proposed resolutions still not in the working paper when adopted, or open/drafting with the problems themselves) are concerned and took into account:

  • CWG1581: When are constexpr member functions defined?
  • LWG2013: Do library implementers have the freedom to add constexpr? (see also here)
  • LWG2072: Unclear wording about capacity of temporary buffers

Beyond C++11 core and library features used conditionally:

  • CWG616: Definition of “indeterminate value” (since b663[2016-01-11]) (see also CWG1213)
    • without CWG129: Stability of uninitialized auto variables
    • without CWG240: Uninitialized values and undefined behavior (see also CWG129)
    • without CWG312: “use” of invalid pointer value not defined (see also CWG623)
    • without CWG623: Use of pointers to deallocated storage (see also CWG312)
  • CWG1558: Unused arguments in alias template specializations (since b653[2015-11-25]; see also CWG1430, CWG1520 and CWG1554)
  • LWG2285: make_reverse_iterator (since b595[2015-05-01])
  • N3478: Core Issue 1512: Pointer comparison vs qualification conversions (since b562[2014-12-22])
    • CWG73: Pointer equality
    • CWG1512: Pointer comparison vs qualification conversions
  • N3493: Compile-time integer sequences (since b589[2015-04-03])
  • N3655: TransformationTraits Redux, v2 (since b595[2015-05-01])
  • N3656: make_unique (Revision 1) (since b617[2015-07-23])
  • N3671: Making non-modifying sequence operations more robust: Revision 2 (since b627[2015-08-30])
  • N4169: A proposal to add invoke function template (Revision 1) (since b617[2015-07-23])
  • N4200: Feature-testing recommendations for C++ (since b591[2015-04-15]; i.e. __has_cpp_attribute, etc)
  • N4389: Wording for bool_constant, revision 1 (since b617[2015-07-23])
  • N4535: Feature-testing preprocessor predicates for C++17 (i.e. __has_include and __has_cpp_attribute, see below)
    • __has_cpp_attribute adopted, see also N4200 above
    • Note some Clang++ extensions are also conditionally supported (considered for conditional inclusion) previously
      • __has_attribute since b431[2013-07-23]
      • __has_extension and __has_feature since b484[2013-03-09]
      • __has_builtin since b535[2014-09-14]

Tentatively not applied

The following changes about standard library are not depended on, but were considered some replacements have been used as forcing the requirements for implementations:

  • N4002: Cleaning‐up noexcept in the Library

These post-C++14 library features are not depended on currently (revised b664[2016-01-15]) but direct replacement (to be used conditionally once the draft standard is approved) is provided in YBase:

  • N3911: TransformationTrait Alias void_t (replaced by ystdex::void_t, with workaround for CWG1558; see also N3843 for motivation)
  • N4277: TriviallyCopyable reference_wrapper (Revision 1) (replaced by ystdex::lref)
  • N4280: Non-member size() and more (Revision 2) (replaced by size, empty and data in namespace ystdex, also ystdex::range_size with addtional interface for std::initializer_list)
  • N4436: Proposing Standard Library Support for the C++ Detection Idiom (partially replaced by is_detected, detected_t, detected_or, detected_or_t, is_detected_exact and is_detected_convertile in namespace ystdex)

These post-C++03 resolutions are not depended on currently (revised b664[2016-01-15]) but confirmed still being compatible:

  • CWG446: Does an lvalue-to-rvalue conversion on the "?" operator produce a temporary?
    • CWG86: Lifetime of temporaries in query expressions
  • CWG462: Lifetime of temporaries bound to comma expressions
  • CWG468: Allow ::template outside of templates
  • CWG475: When is std::uncaught_exception() true? (take 2)
  • CWG569: Spurious semicolons at namespace scope should be allowed
  • CWG573: Conversions between function pointers and void* (see also CWG195/CWG1120)
  • CWG1120: reinterpret_cast and void* (depends on CWG573)
  • CWG1164: Partial ordering of f(T&) and f(T&&)
  • CWG1213: Array subscripting and xvalues (see also CWG616)
  • CWG1301: Value initialization of union
    • CWG1324: Value initialization and defaulted constructors
    • CWG1368: Value initialization and defaulted constructors (part 2)
  • CWG1402: Move functions too often deleted
  • CWG1412: Problems in specifying pointer conversions
  • CWG1579: Return by converting move constructor
  • CWG1591: Deducing array bound and element type from initializer list
  • CWG1693: Superfluous semicolons in class definitions (depends on CWG569)
  • CWG1875: Reordering declarations in class scope
  • CWG1952: Constant expressions and library undefined behavior
  • LWG281: std::min() and max() requirements overly restrictive
  • LWG283: std::replace() requirement incorrect/insufficient
  • LWG387: std::complex over-encapsulated
  • LWG497: meaning of numeric_limits::traps for floating point types
  • LWG531: array forms of unformatted input functions (i.e. for istream::get)
  • LWG551: <ccomplex>
  • LWG566: array forms of unformatted input function undefined for zero-element arrays (i.e. for istream::get)
  • LWG586: string inserter not a formatted function
  • LWG643: Impossible "as if" clauses
  • LWG646: const incorrect match_result members
  • LWG659: istreambuf_iterator should have an operator->()
  • LWG776: Undescribed assign function of std::array (i.e. array::fill)
  • LWG779: Resolution of #283 incomplete
  • LWG787: complexity of binary_search
  • LWG807: tuple construction should not fail unless its element's construction fails
  • LWG844: complex pow return type is ambiguous
  • LWG848: Missing std::hash specializations for std::bitset/std::vector<bool>
  • LWG850: Should shrink_to_fit apply to std::deque? (i.e. deque::shrink_to_fit)
  • LWG852: unordered containers begin(n) mistakenly const
  • LWG900: Stream move-assignment
  • LWG1071: is_bind_expression should derive from integral_constant<bool>
  • LWG2112: User-defined classes that cannot be derived from (i.e. is_final)
  • LWG2247: Type traits and std::nullptr_t (i.e. is_null_pointer)
  • LWG2466: allocator_traits::max_size() default behavior is incorrect
  • N1981: Uniform Use of std::string Revision 1
  • N1990: Proposed Text for minmax (N1840) (i.e. minmax and minmax_element in <algorithm>)
  • N1991: Proposed Text for defaultfloat (N1842) (i.e. defaultfloat in <ios>)
  • N2007: Proposed Library Additions for Code Conversion
  • N2253: Extending sizeof to apply to non-static data members without an object (revision 1)
  • N2292: Standard Library Applications for Deleted Functions
  • N2308: Adding allocator support to std::function for C++0x, with modification
  • N2321: Enhancing the time_get facet for POSIX® compatibility, Revision 2
  • N2351: Improving shared_ptr for C++0x, Revision 2
  • N2353: A Specification for vector<bool>
  • N2547: Allow atomics use in signal handlers
  • N2554: The Scoped Allocator Model (Rev 2)
  • N2760: Input/Output Library Thread Safety
  • N2765: User-defined Literals (aka. Extensible Literals (revision 5))
  • N2782: C++ Data-Dependency Ordering: Function Annotation (i.e. [[carries_dependency]])
  • N3026
    • CWG408: sizeof applied to unknown-bound array static data member of template
    • CWG490: Name lookup in friend declarations
    • CWG722: Can nullptr be passed to an ellipsis?
    • CWG734: Are unique addresses required for namespace-scope variables?
    • CWG935: Missing overloads for character types for user-defined literals
    • CWG1000: Mistaking member typedefs for constructors
  • N3059: Proposal to simplify pair (rev 5.2) (i.e. piecewise_construct_t, etc.)
    • LWG1321: scoped_allocator_adaptor construct and destroy don't use allocator_traits
  • N3843: A SFINAE-Friendly std::common_type
  • N4446: The missing INVOKE related trait (i.e. is_callable)
  • P0096R0: Feature-testing recommendations for C++ (see EWG22 and N4200)
Clone this wiki locally