Refactor std::optional SFINAE constraints
authorJonathan Wakely <jwakely@redhat.com>
Mon, 20 Aug 2018 12:13:25 +0000 (13:13 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 20 Aug 2018 12:13:25 +0000 (13:13 +0100)
commitb655b8fc7eb4af02231fa0105dddd90a8cfceea1
tree61b04ddfbf6feee972e4760ea6d713ca97f7e9aa
parent285ee4d029d29c3baebfc6715249c9724e5f83d1
Refactor std::optional SFINAE constraints

* include/std/optional (_Optional_payload): Use variable templates
for conditions in default template arguments and exception
specifications.
(optional): Likewise. Adjust indentation.
(optional::__not_self, optional::__not_tag, optional::_Requires): New
SFINAE helpers.
(optional::optional): Use new helpers in constructor constraints.
* include/std/type_traits (__or_v, __and_v): New variable templates.
* testsuite/20_util/optional/cons/value_neg.cc: Change dg-error to
dg-prune-output. Remove unused header.

From-SVN: r263657
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/optional
libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/optional/cons/value_neg.cc