Title
conjunction and disjunction requirements are too strict
Status
c++17
Section
[meta.logical]
Submitter
Tim Song

Created on 2015-12-11.00:00:00 last changed 76 months ago

Messages

Date: 2017-12-05.03:48:37

[ We recommend applying the proposed resolution for LWG issues 2567 and 2568 before this proposed resolution, lest the poor editor gets confused. ]

In [meta.logical],

- insert a new paragraph before paragraph 2:

The class template conjunction forms the logical conjunction of its template type arguments.

- move paragraph 4 before paragraph 2, and edit paragraph 2 as follows:

The class template conjunction forms the logical conjunction of its template type arguments. Every template type argument for which Bi::value is instantiated shall be usable as a base class and shall have a member value which is convertible to bool, is not hidden, and is unambiguously available in the type.

- insert a new paragraph before paragraph 5:

The class template disjunction forms the logical disjunction of its template type arguments.

- move paragraph 7 before paragraph 5, and edit paragraph 5 as follows:

The class template disjunction forms the logical disjunction of its template type arguments. Every template type argument for which Bi::value is instantiated shall be usable as a base class and shall have a member value which is convertible to bool, is not hidden, and is unambiguously available in the type.

Date: 2017-12-05.03:48:37

[ Dec 2017 - The resolution for this issue shipped in the C++17 standard; setting status to 'C++17' ]

Date: 2016-11-15.00:00:00

[ 2016-11-15, Reopen upon request of Dawn Perchik ]

The proposed wording requires an update, because the referenced issue LWG 2568 is still open.

Date: 2016-08-02.17:30:37

[ 2016-08 Chicago ]

Ville provided wording for both 2569 and 2570.

Tuesday AM: Move to Tentatively Ready

Date: 2015-12-11.00:00:00

[meta.logical]/2 and /5 impose the following requirement on the arguments of conjunction and disjunction:

Every template type argument shall be usable as a base class and shall have a static data member value which is convertible to bool, is not hidden, and is unambiguously available in the type.

Since the requirement is unconditional, it applies even to type arguments whose instantiation is not required due to short circuiting. This seems contrary to the design intent, expressed in P0013R1, that it is valid to write conjunction_v<is_class<T>, is_foo<T>> even if instantiating is_foo<T>::value is ill-formed for non-class types.

History
Date User Action Args
2017-12-05 03:48:37adminsetmessages: + msg9576
2017-12-05 03:48:37adminsetstatus: open -> c++17
2016-11-15 22:28:57adminsetmessages: + msg8643
2016-11-15 22:28:57adminsetstatus: wp -> open
2016-11-14 03:59:28adminsetstatus: pending -> wp
2016-11-14 03:55:22adminsetstatus: ready -> pending
2016-08-02 17:30:37adminsetstatus: new -> ready
2016-08-02 13:02:46adminsetmessages: + msg8302
2016-08-02 13:02:46adminsetmessages: + msg8301
2015-12-11 00:00:00admincreate