Refactor std::optional SFINAE constraints
commitd3a3029ca7489cb168d493de3d695809e84ffb0f
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Aug 2018 12:13:25 +0000 (20 12:13 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Aug 2018 12:13:25 +0000 (20 12:13 +0000)
tree61b04ddfbf6feee972e4760ea6d713ca97f7e9aa
parent316828699127cc855cf06cbfaee096f6fa75bba4
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263657 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/optional
libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/optional/cons/value_neg.cc