зеркало из https://github.com/microsoft/STL.git
LWG-3211 std::tuple<> should be trivially constructible (#1460)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
This commit is contained in:
Родитель
d06561f891
Коммит
a92064eeca
|
@ -204,7 +204,7 @@ class tuple;
|
|||
template <>
|
||||
class tuple<> { // empty tuple
|
||||
public:
|
||||
constexpr tuple() noexcept /* strengthened */ {}
|
||||
constexpr tuple() noexcept = default; /* strengthened */
|
||||
|
||||
constexpr tuple(const tuple&) noexcept /* strengthened */ {} // TRANSITION, ABI: should be defaulted
|
||||
|
||||
|
|
|
@ -209,6 +209,9 @@ int main() {
|
|||
assert(make_from_tuple<int>(tuple<>{}) == 0);
|
||||
#endif // _HAS_CXX17
|
||||
}
|
||||
|
||||
// LWG-3211 std::tuple<> should be trivially constructible
|
||||
STATIC_ASSERT(is_trivially_default_constructible_v<tuple<>>);
|
||||
}
|
||||
|
||||
// Also test DevDiv-1205400 "C++ compiler: static_assert in std::tuple_element prevents SFINAE".
|
||||
|
|
Загрузка…
Ссылка в новой задаче