This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Core status.
2452.is_constructible
, etc. and default arguments
Section: 21 [meta] Status: Core Submitter: Hubert Tong Opened: 2014-11-04 Last modified: 2015-10-21
Priority: 3
View other active issues in [meta].
View all other issues in [meta].
Discussion:
The BaseCharacteristic
for is_constructible
is defined in terms of the well-formedness of a declaration for an invented variable. The well-formedness of the described declaration itself may change for the same set of arguments because of the introduction of default arguments.
std::is_constructible
; however, it seems that this situation is caused without a user violation of the library requirements or the ODR. There is a similar issue with is_convertible
, result_of
and others. a.cc:
#include <type_traits> struct A { A(int, int); }; const std::false_type& x1 = std::is_constructible<A, int>(); int main() { }
b.cc:
#include <type_traits> struct A { A(int, int); }; inline A::A(int, int = 0) { } const std::true_type& x2 = std::is_constructible<A, int>();
Presumably this program should invoke undefined behaviour, but the Library specification doesn't say that.
[2015-02 Cologne]
Core wording should say "this kind of thing is ill-formed, no diagnostic required"
Proposed resolution:
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