[cfe-commits] [libcxx] r159858 - /libcxx/trunk/include/tuple
Howard Hinnant
hhinnant at apple.com
Fri Jul 6 13:50:27 PDT 2012
Author: hhinnant
Date: Fri Jul 6 15:50:27 2012
New Revision: 159858
URL: http://llvm.org/viewvc/llvm-project?rev=159858&view=rev
Log:
As a conforming extension give tuple a noexcept default constructor conditionalized on its held types.
Modified:
libcxx/trunk/include/tuple
Modified: libcxx/trunk/include/tuple
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/tuple?rev=159858&r1=159857&r2=159858&view=diff
==============================================================================
--- libcxx/trunk/include/tuple (original)
+++ libcxx/trunk/include/tuple Fri Jul 6 15:50:27 2012
@@ -227,7 +227,8 @@
__tuple_leaf& operator=(const __tuple_leaf&);
public:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR __tuple_leaf() : value()
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR __tuple_leaf()
+ _NOEXCEPT_(is_nothrow_default_constructible<_Hp>::value) : value()
{static_assert(!is_reference<_Hp>::value,
"Attempted to default construct a reference element in a tuple");}
@@ -347,7 +348,8 @@
__tuple_leaf& operator=(const __tuple_leaf&);
public:
- _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR __tuple_leaf() {}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR __tuple_leaf()
+ _NOEXCEPT_(is_nothrow_default_constructible<_Hp>::value) {}
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
@@ -437,7 +439,8 @@
: public __tuple_leaf<_Indx, _Tp>...
{
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR __tuple_impl() {}
+ _LIBCPP_CONSTEXPR __tuple_impl()
+ _NOEXCEPT_(__all<is_nothrow_default_constructible<_Tp>::value...>::value) {}
template <size_t ..._Uf, class ..._Tf,
size_t ..._Ul, class ..._Tl, class ..._Up>
@@ -535,7 +538,8 @@
public:
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR tuple() {}
+ _LIBCPP_CONSTEXPR tuple()
+ _NOEXCEPT_(__all<is_nothrow_default_constructible<_Tp>::value...>::value) {}
_LIBCPP_INLINE_VISIBILITY
explicit tuple(const _Tp& ... __t)
@@ -693,7 +697,7 @@
{
public:
_LIBCPP_INLINE_VISIBILITY
- _LIBCPP_CONSTEXPR tuple() {}
+ _LIBCPP_CONSTEXPR tuple() _NOEXCEPT {}
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
tuple(allocator_arg_t, const _Alloc&) {}
More information about the cfe-commits
mailing list