enable_special_members.h: Make _Enable_default_constructor constexpr.
authorTim Shen <timshen@google.com>
Tue, 6 Dec 2016 11:26:48 +0000 (11:26 +0000)
committerTim Shen <timshen@gcc.gnu.org>
Tue, 6 Dec 2016 11:26:48 +0000 (11:26 +0000)
commit458ef69052224b5d3d2c78cfbe0a0e0ec85a4193
treec652adea01f85d2e42973e02cf87c3dcb4147671
parent9189f55908d6655e63fff8d9b9f87ec83d4891e1
enable_special_members.h: Make _Enable_default_constructor constexpr.

* include/bits/enable_special_members.h: Make
_Enable_default_constructor constexpr.
* include/std/variant (variant::emplace, variant::swap, std::swap,
std::hash): Sfinae on emplace and std::swap; handle __poison_hash bases
of duplicated types.
* testsuite/20_util/variant/compile.cc: Add tests.
* testsuite/20_util/variant/hash.cc: Add tests.

From-SVN: r243294
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/enable_special_members.h
libstdc++-v3/include/std/variant
libstdc++-v3/testsuite/20_util/variant/compile.cc
libstdc++-v3/testsuite/20_util/variant/hash.cc