summaryrefslogtreecommitdiffstats
path: root/libcxx/include
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-07-06 20:39:45 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-07-06 20:39:45 +0000
commita62ebe043e3d9364a7b55e05a123bbadd8cfbd99 (patch)
tree05ca1a23b7d6c0ff35c2d0486a5bddb8f494d5cd /libcxx/include
parent239ae7186b72ef7e9f773a1182b5e3fab07529d9 (diff)
downloadbcm5719-llvm-a62ebe043e3d9364a7b55e05a123bbadd8cfbd99.tar.gz
bcm5719-llvm-a62ebe043e3d9364a7b55e05a123bbadd8cfbd99.zip
Give tuple a constexpr default constructor.
llvm-svn: 159857
Diffstat (limited to 'libcxx/include')
-rw-r--r--libcxx/include/tuple12
1 files changed, 9 insertions, 3 deletions
diff --git a/libcxx/include/tuple b/libcxx/include/tuple
index 683c9dd5294..a485d7d1d80 100644
--- a/libcxx/include/tuple
+++ b/libcxx/include/tuple
@@ -227,7 +227,7 @@ class __tuple_leaf
__tuple_leaf& operator=(const __tuple_leaf&);
public:
- _LIBCPP_INLINE_VISIBILITY __tuple_leaf() : value()
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR __tuple_leaf() : value()
{static_assert(!is_reference<_Hp>::value,
"Attempted to default construct a reference element in a tuple");}
@@ -347,7 +347,7 @@ class __tuple_leaf<_Ip, _Hp, true>
__tuple_leaf& operator=(const __tuple_leaf&);
public:
- _LIBCPP_INLINE_VISIBILITY __tuple_leaf() {}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR __tuple_leaf() {}
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
@@ -436,6 +436,9 @@ template<size_t ..._Indx, class ..._Tp>
struct __tuple_impl<__tuple_indices<_Indx...>, _Tp...>
: public __tuple_leaf<_Indx, _Tp>...
{
+ _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR __tuple_impl() {}
+
template <size_t ..._Uf, class ..._Tf,
size_t ..._Ul, class ..._Tl, class ..._Up>
_LIBCPP_INLINE_VISIBILITY
@@ -532,6 +535,9 @@ class _LIBCPP_VISIBLE tuple
public:
_LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_CONSTEXPR tuple() {}
+
+ _LIBCPP_INLINE_VISIBILITY
explicit tuple(const _Tp& ... __t)
: base_(typename __make_tuple_indices<sizeof...(_Tp)>::type(),
typename __make_tuple_types<tuple, sizeof...(_Tp)>::type(),
@@ -687,7 +693,7 @@ class _LIBCPP_VISIBLE tuple<>
{
public:
_LIBCPP_INLINE_VISIBILITY
- tuple() {}
+ _LIBCPP_CONSTEXPR tuple() {}
template <class _Alloc>
_LIBCPP_INLINE_VISIBILITY
tuple(allocator_arg_t, const _Alloc&) {}
OpenPOWER on IntegriCloud