diff --git a/libcxx/include/tuple b/libcxx/include/tuple --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -907,7 +907,7 @@ { public: _LIBCPP_INLINE_VISIBILITY - _LIBCPP_CONSTEXPR tuple() _NOEXCEPT {} + _LIBCPP_CONSTEXPR tuple() _NOEXCEPT = default; template _LIBCPP_INLINE_VISIBILITY tuple(allocator_arg_t, const _Alloc&) _NOEXCEPT {} diff --git a/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/empty_tuple_trivial.pass.cpp b/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/empty_tuple_trivial.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/empty_tuple_trivial.pass.cpp @@ -0,0 +1,22 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// This test ensures that std::tuple<> is trivially constructible. That is not +// required by the Standard, but libc++ provides that guarantee. + +// UNSUPPORTED: c++98, c++03 + +#include +#include + + +static_assert(std::is_trivially_constructible>::value, ""); + +int main(int, char**) { + return 0; +}