A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue2582 below:

§[res.on.functions]/2's prohibition against incomplete types shouldn't apply to type traits

This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++17 status.

2582. §[res.on.functions]/2's prohibition against incomplete types shouldn't apply to type traits

Section: 21 [meta] Status: C++17 Submitter: Tim Song Opened: 2016-01-07 Last modified: 2017-07-30

Priority: 0

View other active issues in [meta].

View all other issues in [meta].

View all issues with C++17 status.

Discussion:

16.4.5.8 [res.on.functions]/2.5 says that the behavior is undefined "if an incomplete type is used as a template argument when instantiating a template component, unless specifically allowed for that component."

This rule should not apply to type traits — a literal application would make is_same<void, void> undefined behavior, since nothing in 21 [meta] (or elsewhere) "specifically allows" instantiating is_same with incomplete types. Traits that require complete types are already explicitly specified as such, so the proposed wording below simply negates 16.4.5.8 [res.on.functions]/2.5 for 21 [meta].

[2016-02, Issues Telecon]

P0; move to Tentatively Ready.

Proposed resolution:

This wording is relative to N4567.

  1. Insert a new paragraph after 21.3.3 [meta.type.synop]/1:

    -?- Unless otherwise specified, an incomplete type may be used to instantiate a template in this subclause.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4