diff --git a/include/__functional_base b/include/__functional_base index ca761c409..9587d7ab1 100644 --- a/include/__functional_base +++ b/include/__functional_base @@ -558,7 +558,7 @@ struct __is_transparent<_Tp, _Up, // allocator_arg_t -struct _LIBCPP_TEMPLATE_VIS allocator_arg_t { explicit allocator_arg_t() = default; }; +struct _LIBCPP_TEMPLATE_VIS allocator_arg_t { }; #if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY) extern _LIBCPP_EXPORTED_FROM_ABI const allocator_arg_t allocator_arg; diff --git a/include/__mutex_base b/include/__mutex_base index ed75c8238..a4ac36161 100644 --- a/include/__mutex_base +++ b/include/__mutex_base @@ -66,9 +66,9 @@ public: static_assert(is_nothrow_default_constructible::value, "the default constructor for std::mutex must be nothrow"); -struct _LIBCPP_TYPE_VIS defer_lock_t { explicit defer_lock_t() = default; }; -struct _LIBCPP_TYPE_VIS try_to_lock_t { explicit try_to_lock_t() = default; }; -struct _LIBCPP_TYPE_VIS adopt_lock_t { explicit adopt_lock_t() = default; }; +struct _LIBCPP_TYPE_VIS defer_lock_t {}; +struct _LIBCPP_TYPE_VIS try_to_lock_t {}; +struct _LIBCPP_TYPE_VIS adopt_lock_t {}; #if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY) diff --git a/include/mutex b/include/mutex index 8fc3c6122..dca62202d 100644 --- a/include/mutex +++ b/include/mutex @@ -86,9 +86,9 @@ public: void unlock(); }; -struct defer_lock_t { explicit defer_lock_t() = default; }; -struct try_to_lock_t { explicit try_to_lock_t() = default; }; -struct adopt_lock_t { explicit adopt_lock_t() = default; }; +struct defer_lock_t {}; +struct try_to_lock_t {}; +struct adopt_lock_t {}; inline constexpr defer_lock_t defer_lock{}; inline constexpr try_to_lock_t try_to_lock{}; diff --git a/include/new b/include/new index 40d351e9b..85e4c4b3f 100644 --- a/include/new +++ b/include/new @@ -39,7 +39,7 @@ struct destroying_delete_t { // C++20 }; inline constexpr destroying_delete_t destroying_delete{}; // C++20 -struct nothrow_t { explicit nothrow_t() = default; }; +struct nothrow_t {}; extern const nothrow_t nothrow; typedef void (*new_handler)(); new_handler set_new_handler(new_handler new_p) noexcept; @@ -126,7 +126,7 @@ namespace std // purposefully not using versioning namespace { #if !defined(_LIBCPP_ABI_VCRUNTIME) -struct _LIBCPP_TYPE_VIS nothrow_t { explicit nothrow_t() = default; }; +struct _LIBCPP_TYPE_VIS nothrow_t {}; extern _LIBCPP_FUNC_VIS const nothrow_t nothrow; class _LIBCPP_EXCEPTION_ABI bad_alloc diff --git a/include/tuple b/include/tuple index c4cd3bc54..32bc86913 100644 --- a/include/tuple +++ b/include/tuple @@ -19,7 +19,7 @@ namespace std template class tuple { public: - explicit(see-below) constexpr tuple(); + constexpr tuple(); explicit(see-below) tuple(const T&...); // constexpr in C++14 template explicit(see-below) tuple(U&&...); // constexpr in C++14 @@ -500,22 +500,9 @@ class _LIBCPP_TEMPLATE_VIS tuple struct _CheckArgsConstructor { template - struct __enable_implicit_default - // In C++03, there's no way to implement the resolution of LWG2510. -#ifdef _LIBCPP_CXX03_LANG - : true_type -#else - : __all<__is_implicitly_default_constructible<_Args>::value...> -#endif - { }; - - template - struct __enable_explicit_default - : integral_constant::value...>::value && - !__enable_implicit_default<_Args...>::value - > - { }; + static constexpr bool __enable_default() { + return __all::value...>::value; + } template static constexpr bool __enable_explicit() { @@ -654,29 +641,22 @@ class _LIBCPP_TEMPLATE_VIS tuple const typename tuple_element<_Jp, tuple<_Up...> >::type&& get(const tuple<_Up...>&&) _NOEXCEPT; public: - template ::template __enable_implicit_default<_Tp...>::value - , void*> = nullptr> - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR - tuple() - _NOEXCEPT_(__all::value...>::value) {} - - template ::template __enable_explicit_default<_Tp...>::value - , void*> = nullptr> - explicit _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR - tuple() + template ::template __enable_default<_Tp...>() + >::type> + _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR tuple() _NOEXCEPT_(__all::value...>::value) {} tuple(tuple const&) = default; tuple(tuple&&) = default; - template , - typename _CheckArgsConstructor<_Dummy>::template __enable_implicit_default<_Tp...> + __dependent_type, _Dummy>... >::value - , void*> = nullptr + > > _LIBCPP_INLINE_VISIBILITY tuple(_AllocArgT, _Alloc const& __a) @@ -685,20 +665,6 @@ public: typename __make_tuple_indices::type(), __tuple_types<_Tp...>()) {} - template , - typename _CheckArgsConstructor<_Dummy>::template __enable_explicit_default<_Tp...> - >::value - , void*> = nullptr - > - explicit _LIBCPP_INLINE_VISIBILITY - tuple(_AllocArgT, _Alloc const& __a) - : __base_(allocator_arg_t(), __a, - __tuple_indices<>(), __tuple_types<>(), - typename __make_tuple_indices::type(), - __tuple_types<_Tp...>()) {} - template ::value; #endif -#ifndef _LIBCPP_CXX03_LANG -template -void __test_implicit_default_constructible(_Tp); - -template -struct __is_implicitly_default_constructible - : false_type -{ }; - -template -struct __is_implicitly_default_constructible<_Tp, decltype(__test_implicit_default_constructible<_Tp const&>({}))> - : is_default_constructible<_Tp> -{ }; -#endif // !C++03 - // is_copy_constructible template diff --git a/include/utility b/include/utility index c90d049cf..64599c8d5 100644 --- a/include/utility +++ b/include/utility @@ -69,7 +69,7 @@ struct pair pair(const pair&) = default; pair(pair&&) = default; - explicit(see-below) constexpr pair(); + constexpr pair(); explicit(see-below) pair(const T1& x, const T2& y); // constexpr in C++14 template explicit(see-below) pair(U&& x, V&& y); // constexpr in C++14 template explicit(see-below) pair(const pair& p); // constexpr in C++14 @@ -99,7 +99,7 @@ template void swap(pair& x, pair& y) noexcept(noexcept(x.swap(y))); -struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; +struct piecewise_construct_t { }; inline constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); template struct tuple_size; @@ -276,7 +276,7 @@ template constexpr add_const_t<_Tp>& as_const(_Tp& __t) noexcept { r template void as_const(const _Tp&&) = delete; #endif -struct _LIBCPP_TEMPLATE_VIS piecewise_construct_t { explicit piecewise_construct_t() = default; }; +struct _LIBCPP_TEMPLATE_VIS piecewise_construct_t { }; #if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY) extern _LIBCPP_EXPORTED_FROM_ABI const piecewise_construct_t piecewise_construct;// = piecewise_construct_t(); #else @@ -335,21 +335,9 @@ struct _LIBCPP_TEMPLATE_VIS pair struct _CheckArgs { template - static constexpr bool __enable_explicit_default() { + static constexpr bool __enable_default() { return is_default_constructible<_U1>::value - && is_default_constructible<_U2>::value - && !__enable_implicit_default<_U1, _U2>(); - } - - template - static constexpr bool __enable_implicit_default() { - // In C++03, there's no way to implement the resolution of LWG2510. -#ifdef _LIBCPP_CXX03_LANG - return true; -#else - return __is_implicitly_default_constructible<_U1>::value - && __is_implicitly_default_constructible<_U2>::value; -#endif + && is_default_constructible<_U2>::value; } template @@ -400,15 +388,7 @@ struct _LIBCPP_TEMPLATE_VIS pair >::type; template::template __enable_explicit_default<_T1, _T2>() - > = false> - explicit _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR - pair() _NOEXCEPT_(is_nothrow_default_constructible::value && - is_nothrow_default_constructible::value) - : first(), second() {} - - template::template __enable_implicit_default<_T1, _T2>() + _CheckArgsDep<_Dummy>::template __enable_default<_T1, _T2>() > = false> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR pair() _NOEXCEPT_(is_nothrow_default_constructible::value && diff --git a/src/mutex.cpp b/src/mutex.cpp index 7e979cd89..182785733 100644 --- a/src/mutex.cpp +++ b/src/mutex.cpp @@ -21,9 +21,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD #ifndef _LIBCPP_HAS_NO_THREADS -const defer_lock_t defer_lock{}; -const try_to_lock_t try_to_lock{}; -const adopt_lock_t adopt_lock{}; +const defer_lock_t defer_lock = {}; +const try_to_lock_t try_to_lock = {}; +const adopt_lock_t adopt_lock = {}; // ~mutex is defined elsewhere diff --git a/src/utility.cpp b/src/utility.cpp index 6a690dc28..016a5d91b 100644 --- a/src/utility.cpp +++ b/src/utility.cpp @@ -10,6 +10,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD -const piecewise_construct_t piecewise_construct{}; +const piecewise_construct_t piecewise_construct = {}; _LIBCPP_END_NAMESPACE_STD diff --git a/test/libcxx/diagnostics/enable_nodiscard.fail.cpp b/test/libcxx/diagnostics/enable_nodiscard.fail.cpp index b42e4c4e9..0cd74be2f 100644 --- a/test/libcxx/diagnostics/enable_nodiscard.fail.cpp +++ b/test/libcxx/diagnostics/enable_nodiscard.fail.cpp @@ -14,7 +14,7 @@ // UNSUPPORTED: c++98, c++03 // GCC 7 is the first version to introduce [[nodiscard]] -// UNSUPPORTED: gcc-5, gcc-6 +// UNSUPPORTED: gcc-4.9, gcc-5, gcc-6 // MODULES_DEFINES: _LIBCPP_ENABLE_NODISCARD #define _LIBCPP_ENABLE_NODISCARD diff --git a/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.fail.cpp b/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.fail.cpp index 72fbc0119..530ea54ca 100644 --- a/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.fail.cpp +++ b/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.fail.cpp @@ -10,7 +10,7 @@ // UNSUPPORTED: c++98, c++03 // GCC 7 is the first version to introduce [[nodiscard]] -// UNSUPPORTED: gcc-5, gcc-6 +// UNSUPPORTED: gcc-4.9, gcc-5, gcc-6 // Test that _LIBCPP_DISABLE_NODISCARD_EXT only disables _LIBCPP_NODISCARD_EXT // and not _LIBCPP_NODISCARD_AFTER_CXX17. diff --git a/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.fail.cpp b/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.fail.cpp index 65e5e1521..56df9248d 100644 --- a/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.fail.cpp +++ b/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.fail.cpp @@ -10,7 +10,7 @@ // UNSUPPORTED: c++98, c++03 // GCC 7 is the first version to introduce [[nodiscard]] -// UNSUPPORTED: gcc-5, gcc-6 +// UNSUPPORTED: gcc-4.9, gcc-5, gcc-6 // MODULES_DEFINES: _LIBCPP_ENABLE_NODISCARD diff --git a/test/libcxx/diagnostics/nodiscard_extensions.fail.cpp b/test/libcxx/diagnostics/nodiscard_extensions.fail.cpp index dd02a3dd2..43cc080e2 100644 --- a/test/libcxx/diagnostics/nodiscard_extensions.fail.cpp +++ b/test/libcxx/diagnostics/nodiscard_extensions.fail.cpp @@ -10,7 +10,7 @@ // UNSUPPORTED: c++98, c++03 // GCC versions prior to 7.0 don't provide the required [[nodiscard]] attribute. -// UNSUPPORTED: gcc-5, gcc-6 +// UNSUPPORTED: gcc-4, gcc-5, gcc-6 // AppleClang9 doesn't yet support C++17's implicitly synthesized deduction // guides from existing ctors, needed by default_searcher() below. diff --git a/test/libcxx/type_traits/is_implicitly_default_constructible.pass.cpp b/test/libcxx/type_traits/is_implicitly_default_constructible.pass.cpp deleted file mode 100644 index c8f9e357c..000000000 --- a/test/libcxx/type_traits/is_implicitly_default_constructible.pass.cpp +++ /dev/null @@ -1,59 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03 - -// Before GCC 6, this trait fails. See https://stackoverflow.com/q/41799015/627587. -// UNSUPPORTED: gcc-5 - -// - -// __is_implicitly_default_constructible - -#include - - -struct ExplicitlyDefaultConstructible1 { - explicit ExplicitlyDefaultConstructible1() = default; -}; - -struct ExplicitlyDefaultConstructible2 { - explicit ExplicitlyDefaultConstructible2() { } -}; - -struct ImplicitlyDefaultConstructible1 { - ImplicitlyDefaultConstructible1() { } -}; - -struct ImplicitlyDefaultConstructible2 { - ImplicitlyDefaultConstructible2() = default; -}; - -struct NonDefaultConstructible1 { - NonDefaultConstructible1() = delete; -}; - -struct NonDefaultConstructible2 { - explicit NonDefaultConstructible2() = delete; -}; - -struct NonDefaultConstructible3 { - NonDefaultConstructible3(NonDefaultConstructible3&&) { } -}; - -static_assert(!std::__is_implicitly_default_constructible::value, ""); -static_assert(!std::__is_implicitly_default_constructible::value, ""); -static_assert(std::__is_implicitly_default_constructible::value, ""); -static_assert(std::__is_implicitly_default_constructible::value, ""); -static_assert(!std::__is_implicitly_default_constructible::value, ""); -static_assert(!std::__is_implicitly_default_constructible::value, ""); -static_assert(!std::__is_implicitly_default_constructible::value, ""); - -int main(int, char**) { - return 0; -} diff --git a/test/libcxx/utilities/utility/pairs/pairs.pair/non_trivial_copy_move_ABI.pass.cpp b/test/libcxx/utilities/utility/pairs/pairs.pair/non_trivial_copy_move_ABI.pass.cpp index 65fe65a1a..00c1910a3 100644 --- a/test/libcxx/utilities/utility/pairs/pairs.pair/non_trivial_copy_move_ABI.pass.cpp +++ b/test/libcxx/utilities/utility/pairs/pairs.pair/non_trivial_copy_move_ABI.pass.cpp @@ -6,6 +6,9 @@ // //===----------------------------------------------------------------------===// +// The test fails due to the missing is_trivially_constructible intrinsic. +// XFAIL: gcc-4.9 + // The test suite needs to define the ABI macros on the command line when // modules are enabled. // UNSUPPORTED: -fmodules diff --git a/test/libcxx/utilities/utility/pairs/pairs.pair/trivial_copy_move_ABI.pass.cpp b/test/libcxx/utilities/utility/pairs/pairs.pair/trivial_copy_move_ABI.pass.cpp index 135715751..1086011c3 100644 --- a/test/libcxx/utilities/utility/pairs/pairs.pair/trivial_copy_move_ABI.pass.cpp +++ b/test/libcxx/utilities/utility/pairs/pairs.pair/trivial_copy_move_ABI.pass.cpp @@ -6,6 +6,9 @@ // //===----------------------------------------------------------------------===// +// The test fails due to the missing is_trivially_constructible intrinsic. +// XFAIL: gcc-4.9 + // // template struct pair diff --git a/test/std/experimental/simd/simd.cons/broadcast.pass.cpp b/test/std/experimental/simd/simd.cons/broadcast.pass.cpp index 57a6cd57e..cf038e384 100644 --- a/test/std/experimental/simd/simd.cons/broadcast.pass.cpp +++ b/test/std/experimental/simd/simd.cons/broadcast.pass.cpp @@ -8,6 +8,9 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 +// See GCC PR63723. +// UNSUPPORTED: gcc-4.9 + // // // [simd.class] diff --git a/test/std/experimental/simd/simd.cons/generator.pass.cpp b/test/std/experimental/simd/simd.cons/generator.pass.cpp index 7b7c883f4..500ccce81 100644 --- a/test/std/experimental/simd/simd.cons/generator.pass.cpp +++ b/test/std/experimental/simd/simd.cons/generator.pass.cpp @@ -8,6 +8,9 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 +// See GCC PR63723. +// UNSUPPORTED: gcc-4.9 + // // // [simd.class] diff --git a/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp b/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp index aa00a0d53..5170b1e53 100644 --- a/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp +++ b/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp @@ -8,6 +8,9 @@ // +// Test fails due to use of is_trivially_* trait. +// XFAIL: gcc-4.9 + // template , // class Distance = ptrdiff_t> // class istream_iterator diff --git a/test/std/iterators/stream.iterators/istreambuf.iterator/types.pass.cpp b/test/std/iterators/stream.iterators/istreambuf.iterator/types.pass.cpp index c2f323b03..a6c6435f1 100644 --- a/test/std/iterators/stream.iterators/istreambuf.iterator/types.pass.cpp +++ b/test/std/iterators/stream.iterators/istreambuf.iterator/types.pass.cpp @@ -8,6 +8,9 @@ // +// Test fails due to use of is_trivially_* trait. +// XFAIL: gcc-4.9 + // template > // class istreambuf_iterator // : public iterator #include #include diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp index 819d62ae2..deb17d1ae 100644 --- a/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp +++ b/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp @@ -15,6 +15,10 @@ // (except clang-3.6 which temporarily enabled sized-deallocation) // UNSUPPORTED: clang, apple-clang +// NOTE: GCC 4.9.1 does not support sized-deallocation in C++14. However +// GCC 5.1 does. +// XFAIL: gcc-4.7, gcc-4.8, gcc-4.9 + #include #include #include diff --git a/test/std/language.support/support.dynamic/nothrow_t.fail.cpp b/test/std/language.support/support.dynamic/nothrow_t.fail.cpp deleted file mode 100644 index 78ab087c3..000000000 --- a/test/std/language.support/support.dynamic/nothrow_t.fail.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03 - -// Before GCC 6, aggregate initialization kicks in. -// See https://stackoverflow.com/q/41799015/627587. -// UNSUPPORTED: gcc-5 - -// struct nothrow_t { -// explicit nothrow_t() = default; -// }; -// extern const nothrow_t nothrow; - -// This test checks for LWG 2510. - -#include - - -std::nothrow_t f() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} - -int main(int, char**) { - return 0; -} diff --git a/test/std/language.support/support.dynamic/nothrow_t.pass.cpp b/test/std/language.support/support.dynamic/nothrow_t.pass.cpp deleted file mode 100644 index 3a6231329..000000000 --- a/test/std/language.support/support.dynamic/nothrow_t.pass.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// struct nothrow_t { -// explicit nothrow_t() = default; -// }; -// extern const nothrow_t nothrow; - -#include - - -int main(int, char**) { - std::nothrow_t x = std::nothrow; - (void)x; - - return 0; -} diff --git a/test/std/thread/thread.mutex/thread.lock/types.fail.cpp b/test/std/thread/thread.mutex/thread.lock/types.fail.cpp deleted file mode 100644 index 4542c04c2..000000000 --- a/test/std/thread/thread.mutex/thread.lock/types.fail.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03 -// UNSUPPORTED: libcpp-has-no-threads - -// Before GCC 6, aggregate initialization kicks in. -// See https://stackoverflow.com/q/41799015/627587. -// UNSUPPORTED: gcc-5 - -// - -// struct defer_lock_t { explicit defer_lock_t() = default; }; -// struct try_to_lock_t { explicit try_to_lock_t() = default; }; -// struct adopt_lock_t { explicit adopt_lock_t() = default; }; - -// This test checks for LWG 2510. - -#include - - -std::defer_lock_t f1() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} -std::try_to_lock_t f2() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} -std::adopt_lock_t f3() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} - -int main(int, char**) { - return 0; -} diff --git a/test/std/thread/thread.mutex/thread.lock/types.pass.cpp b/test/std/thread/thread.mutex/thread.lock/types.pass.cpp index c03ca4622..84c39baaf 100644 --- a/test/std/thread/thread.mutex/thread.lock/types.pass.cpp +++ b/test/std/thread/thread.mutex/thread.lock/types.pass.cpp @@ -10,15 +10,16 @@ // -// struct defer_lock_t { explicit defer_lock_t() = default; }; -// struct try_to_lock_t { explicit try_to_lock_t() = default; }; -// struct adopt_lock_t { explicit adopt_lock_t() = default; }; +// struct defer_lock_t {}; +// struct try_to_lock_t {}; +// struct adopt_lock_t {}; // // constexpr defer_lock_t defer_lock{}; // constexpr try_to_lock_t try_to_lock{}; // constexpr adopt_lock_t adopt_lock{}; #include +#include #include "test_macros.h" @@ -32,5 +33,5 @@ int main(int, char**) T2 t2 = std::try_to_lock; ((void)t2); T3 t3 = std::adopt_lock; ((void)t3); - return 0; + return 0; } diff --git a/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp b/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp index d8d75443b..17eef26f0 100644 --- a/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp +++ b/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp @@ -13,6 +13,9 @@ // Test that reference wrapper meets the requirements of CopyConstructible and // CopyAssignable, and TriviallyCopyable (starting in C++14). +// Test fails due to use of is_trivially_* trait. +// XFAIL: gcc-4.9 && c++14 + #include #include #include diff --git a/test/std/utilities/memory/allocator.tag/allocator_arg.fail.cpp b/test/std/utilities/memory/allocator.tag/allocator_arg.fail.cpp deleted file mode 100644 index fb991d425..000000000 --- a/test/std/utilities/memory/allocator.tag/allocator_arg.fail.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03 - -// Before GCC 6, aggregate initialization kicks in. -// See https://stackoverflow.com/q/41799015/627587. -// UNSUPPORTED: gcc-5 - -// - -// struct allocator_arg_t { explicit allocator_arg_t() = default; }; -// const allocator_arg_t allocator_arg = allocator_arg_t(); - -// This test checks for LWG 2510. - -#include - - -std::allocator_arg_t f() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} - -int main(int, char**) { - return 0; -} diff --git a/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp b/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp index e22bec1e5..025324331 100644 --- a/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp +++ b/test/std/utilities/memory/allocator.tag/allocator_arg.pass.cpp @@ -8,7 +8,7 @@ // -// struct allocator_arg_t { explicit allocator_arg_t() = default; }; +// struct allocator_arg_t { }; // const allocator_arg_t allocator_arg = allocator_arg_t(); #include @@ -21,5 +21,5 @@ int main(int, char**) { test(std::allocator_arg); - return 0; + return 0; } diff --git a/test/std/utilities/memory/specialized.algorithms/specialized.addressof/constexpr_addressof.pass.cpp b/test/std/utilities/memory/specialized.algorithms/specialized.addressof/constexpr_addressof.pass.cpp index ae8a162ef..2aabf812a 100644 --- a/test/std/utilities/memory/specialized.algorithms/specialized.addressof/constexpr_addressof.pass.cpp +++ b/test/std/utilities/memory/specialized.algorithms/specialized.addressof/constexpr_addressof.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: gcc-5, gcc-6 +// XFAIL: gcc-4, gcc-5, gcc-6 // diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp index 8202fd73e..e6f70123b 100644 --- a/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp +++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03, c++11, c++14 -// UNSUPPORTED: clang-3, clang-4, clang-5, apple-clang, gcc-5, gcc-6 +// UNSUPPORTED: clang-3, clang-4, clang-5, apple-clang, gcc-4, gcc-5, gcc-6 // type_traits diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp index 5113651dd..124480c07 100644 --- a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp +++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp @@ -10,6 +10,8 @@ // is_trivially_assignable +// XFAIL: gcc-4.9 + #include #include "test_macros.h" diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable.pass.cpp index 17104f4af..91fbf69f4 100644 --- a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable.pass.cpp +++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable.pass.cpp @@ -10,6 +10,8 @@ // is_trivially_copy_assignable +// XFAIL: gcc-4.9 + #include #include "test_macros.h" diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible.pass.cpp index 09647c710..5744d2ca0 100644 --- a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible.pass.cpp +++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible.pass.cpp @@ -10,6 +10,8 @@ // is_trivially_copy_constructible +// XFAIL: gcc-4.9 + #include #include "test_macros.h" diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable.pass.cpp index b599ae56f..0a91efdf0 100644 --- a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable.pass.cpp +++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable.pass.cpp @@ -10,6 +10,8 @@ // is_trivially_move_assignable +// XFAIL: gcc-4.9 + #include #include "test_macros.h" diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible.pass.cpp index 3503648dd..78c10a132 100644 --- a/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible.pass.cpp +++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible.pass.cpp @@ -10,6 +10,8 @@ // is_trivially_move_constructible +// XFAIL: gcc-4.9 + #include #include "test_macros.h" diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.fail.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.fail.cpp deleted file mode 100644 index abb8073a6..000000000 --- a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.fail.cpp +++ /dev/null @@ -1,33 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03 - -// - -// template class tuple; - -// template -// explicit(see-below) tuple(allocator_arg_t, const Alloc& a); - -// Make sure we get the explicit-ness of the constructor right. -// This is LWG 3158. - -#include -#include - - -struct ExplicitDefault { explicit ExplicitDefault() { } }; - -std::tuple explicit_default_test() { - return {std::allocator_arg, std::allocator()}; // expected-error {{chosen constructor is explicit in copy-initialization}} -} - -int main(int, char**) { - return 0; -} diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp index 13511fa51..b0f957e3a 100644 --- a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp +++ b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp @@ -13,7 +13,7 @@ // template class tuple; // template -// explicit(see-below) tuple(allocator_arg_t, const Alloc& a); +// tuple(allocator_arg_t, const Alloc& a); // NOTE: this constructor does not currently support tags derived from // allocator_arg_t because libc++ has to deduce the parameter as a template diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.fail.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.fail.cpp deleted file mode 100644 index 616550f60..000000000 --- a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.fail.cpp +++ /dev/null @@ -1,53 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03 - -// Before GCC 6, aggregate initialization kicks in. -// See https://stackoverflow.com/q/41799015/627587. -// UNSUPPORTED: gcc-5 - -// - -// template class tuple; - -// explicit(see-below) constexpr tuple(); - -#include - - -struct Implicit { - Implicit() = default; -}; - -struct Explicit { - explicit Explicit() = default; -}; - -std::tuple<> test1() { return {}; } - -std::tuple test2() { return {}; } -std::tuple test3() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} - -std::tuple test4() { return {}; } -std::tuple test5() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} -std::tuple test6() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} -std::tuple test7() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} - -std::tuple test8() { return {}; } -std::tuple test9() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} -std::tuple test10() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} -std::tuple test11() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} -std::tuple test12() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} -std::tuple test13() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} -std::tuple test14() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} -std::tuple test15() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} - -int main(int, char**) { - return 0; -} diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp index 9f8559862..46fd35ad4 100644 --- a/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp +++ b/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp @@ -10,7 +10,7 @@ // template class tuple; -// explicit(see-below) constexpr tuple(); +// constexpr tuple(); // UNSUPPORTED: c++98, c++03 diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp index 3062bc7d1..f83ce7f13 100644 --- a/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp +++ b/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp @@ -14,6 +14,7 @@ // struct tuple_size> // : public integral_constant { }; +// XFAIL: gcc-4.9 // UNSUPPORTED: c++98, c++03 #include diff --git a/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_value_sfinae.pass.cpp b/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_value_sfinae.pass.cpp index 62e584d3f..aad003039 100644 --- a/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_value_sfinae.pass.cpp +++ b/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_value_sfinae.pass.cpp @@ -14,6 +14,7 @@ // class tuple_size> // : public integral_constant { }; +// XFAIL: gcc-4.9 // UNSUPPORTED: c++98, c++03 #include diff --git a/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct.pass.cpp b/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct.pass.cpp index 903aa9355..d70d060de 100644 --- a/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct.pass.cpp +++ b/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct.pass.cpp @@ -12,7 +12,7 @@ // template struct pair -// struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; +// struct piecewise_construct_t { }; // constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); #include diff --git a/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct_t.fail.cpp b/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct_t.fail.cpp deleted file mode 100644 index b8dd28a57..000000000 --- a/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct_t.fail.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03 - -// Before GCC 6, aggregate initialization kicks in. -// See https://stackoverflow.com/q/41799015/627587. -// UNSUPPORTED: gcc-5 - -// - -// struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; -// constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); - -// This test checks for LWG 2510. - -#include - - -std::piecewise_construct_t f() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} - -int main(int, char**) { - return 0; -} diff --git a/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct_t.pass.cpp b/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct_t.pass.cpp deleted file mode 100644 index 0fdba0674..000000000 --- a/test/std/utilities/utility/pairs/pair.piecewise/piecewise_construct_t.pass.cpp +++ /dev/null @@ -1,24 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03 - -// - -// struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; -// constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); - -#include - - -int main(int, char**) { - std::piecewise_construct_t x = std::piecewise_construct; - (void)x; - - return 0; -} diff --git a/test/std/utilities/utility/pairs/pairs.pair/default.explicit.fail.cpp b/test/std/utilities/utility/pairs/pairs.pair/default.explicit.fail.cpp deleted file mode 100644 index 511f21ec3..000000000 --- a/test/std/utilities/utility/pairs/pairs.pair/default.explicit.fail.cpp +++ /dev/null @@ -1,42 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03 - -// Before GCC 6, aggregate initialization kicks in. -// See https://stackoverflow.com/q/41799015/627587. -// UNSUPPORTED: gcc-5 - -// - -// template struct pair - -// explicit(see-below) constexpr pair(); - -// This test checks the conditional explicitness of std::pair's default -// constructor as introduced by the resolution of LWG 2510. - -#include - - -struct ImplicitlyDefaultConstructible { - ImplicitlyDefaultConstructible() = default; -}; - -struct ExplicitlyDefaultConstructible { - explicit ExplicitlyDefaultConstructible() = default; -}; - -std::pair test1() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} -std::pair test2() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} -std::pair test3() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}} -std::pair test4() { return {}; } - -int main(int, char**) { - return 0; -} diff --git a/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp b/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp index d21497205..de3730ef3 100644 --- a/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp +++ b/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp @@ -10,7 +10,12 @@ // template struct pair -// explicit(see-below) constexpr pair(); +// constexpr pair(); + +// This test doesn't pass due to a constexpr bug in GCC 4.9 that fails +// to initialize any type without a user provided constructor in a constant +// expression (e.g. float). +// XFAIL: gcc-4.9 // NOTE: The SFINAE on the default constructor is tested in // default-sfinae.pass.cpp diff --git a/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp b/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp index be7c0a8a8..6841f2865 100644 --- a/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp +++ b/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp @@ -13,6 +13,9 @@ // pair(pair const&) = default; // pair(pair&&) = default; +// Doesn't pass due to use of is_trivially_* trait. +// XFAIL: gcc-4.9 + #include #include diff --git a/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp b/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp index 24d686967..ef6a82c80 100644 --- a/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp +++ b/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp @@ -8,6 +8,10 @@ // UNSUPPORTED: c++98, c++03 +// This workaround option is specific to MSVC's C1XX, so we don't care that +// it isn't set for older GCC versions. +// XFAIL: gcc-4.9 + // Verify TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE. #include diff --git a/www/cxx1z_status.html b/www/cxx1z_status.html index 627f9a085..227c05fa2 100644 --- a/www/cxx1z_status.html +++ b/www/cxx1z_status.html @@ -372,7 +372,7 @@ 2468Self-move-assignment of library typesIssaquah 2475Allow overwriting of std::basic_string terminator with charT() to allow cleaner interoperation with legacy APIsIssaquahComplete 2503multiline option should be added to syntax_option_typeIssaquah - 2510Tag types should not be DefaultConstructibleIssaquahComplete + 2510Tag types should not be DefaultConstructibleIssaquah 2514Type traits must not be finalIssaquahComplete 2518[fund.ts.v2] Non-member swap for propagate_const should call member swapIssaquahComplete 2519Iterator operator-= has gratuitous undefined behaviourIssaquahComplete diff --git a/www/cxx2a_status.html b/www/cxx2a_status.html index 6008c2206..cc84bbe73 100644 --- a/www/cxx2a_status.html +++ b/www/cxx2a_status.html @@ -358,7 +358,7 @@ 3182Specification of Same could be clearerKona - 2899is_(nothrow_)move_constructible and tuple, optional and unique_ptrCologneComplete + 2899is_(nothrow_)move_constructible and tuple, optional and unique_ptrCologne 3055path::operator+=(single-character) misspecifiedCologne 3158tuple(allocator_arg_t, const Alloc&) should be conditionally explicitCologne 3169ranges permutation generators discard useful informationCologne diff --git a/www/upcoming_meeting.html b/www/upcoming_meeting.html index 7c7d2a28a..29b5174ae 100644 --- a/www/upcoming_meeting.html +++ b/www/upcoming_meeting.html @@ -61,7 +61,7 @@ Issue #Has P/RIssue NameMeetingStatus 2899Yesis_(nothrow_)move_constructible and tuple, optional and unique_ptrCologne 3055Yespath::operator+=(single-character) misspecifiedCologne -3158Yestuple(allocator_arg_t, const Alloc&) should be conditionally explicitCologneComplete +3158Yestuple(allocator_arg_t, const Alloc&) should be conditionally explicitCologne 3169Yesranges permutation generators discard useful informationCologne 3183YesNormative permission to specialize Ranges variable templatesCologne 3184YesInconsistencies in bind_front wordingCologne @@ -95,6 +95,7 @@
  • 2899 - Louis
  • 3055 - Eric?
  • +
  • 3158 - Louis
  • 3169 - We don't do ranges yet
  • 3183 - We don't do ranges yet
  • 3184 - We don't do bind_front yet