1391. constructible/convertible traits and access control

Section: 21 [meta] Status: Resolved Submitter: DIN Opened: 2010-08-25 Last modified: 2016-01-28 10:19:27 UTC

Priority: Not Prioritized

View other active issues in [meta].

View all other issues in [meta].

View all issues with Resolved status.


Addresses DE-18

Several type traits require compiler support, e.g. std::is_constructible or std::is_convertible. Their current specification seems to imply, that the corresponding test expressions should be well-formed, even in absense of access:

class X { X(int){} };
constexpr bool test = std::is_constructible<X, int>::value;

The specification does not clarify the context of this test and because it already goes beyond normal language rules, it's hard to argue by means of normal language rules what the context and outcome of the test should be.

[ Resolution proposed by ballot comment ]

Specify that std::is_constructible and std::is_convertible will return true only for public constructors/conversion functions.

[ 2010-10-24 Daniel adds: ]

Accepting n3142 would solve this issue.

Proposed resolution:

Resolved by paper n3142.