summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/std/array
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-07 00:17:09 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-07 00:17:09 +0000
commit241361d8650b580e69b2394086f3161a016e6486 (patch)
tree3314cafd20ffc16d0f32b5a0d9fa97282e73e9ba /libstdc++-v3/include/std/array
parent55ca45ec841723826420d9a99c63dc1db0a74379 (diff)
downloadgcc-241361d8650b580e69b2394086f3161a016e6486.tar.gz
2011-09-06 Benjamin Kosnik <bkoz@redhat.com>
* include/std/tuple (_Tuple_impl::_M_head, _M_tail): Mark constexpr. (tuple(tuple&&)): Same. (tuple(const tuple<_UElements...>& __in)): Same. (tuple(tuple<_UElements...>&& __in)): Same. (tuple_cat(const tuple<_TElements...>&, const tuple<_UElements...>&)): Same. (get): Same. * include/std/array: Consolidate array::data usage. * testsuite/23_containers/array/requirements/constexpr_functions.cc: Remove extra include. * testsuite/20_util/tuple/creation_functions/constexpr.cc: New. * testsuite/20_util/tuple/cons/constexpr-2.cc: Add tests. * testsuite/20_util/tuple/cons/constexpr-3.cc: Same. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust line numbers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178620 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std/array')
-rw-r--r--libstdc++-v3/include/std/array16
1 files changed, 8 insertions, 8 deletions
diff --git a/libstdc++-v3/include/std/array b/libstdc++-v3/include/std/array
index 39573bec844..4d6b688843e 100644
--- a/libstdc++-v3/include/std/array
+++ b/libstdc++-v3/include/std/array
@@ -61,8 +61,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct array
{
typedef _Tp value_type;
- typedef _Tp* pointer;
- typedef const _Tp* const_pointer;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
typedef value_type& reference;
typedef const value_type& const_reference;
typedef value_type* iterator;
@@ -90,19 +90,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Iterators.
iterator
begin() noexcept
- { return iterator(std::__addressof(_M_instance[0])); }
+ { return iterator(data()); }
const_iterator
begin() const noexcept
- { return const_iterator(std::__addressof(_M_instance[0])); }
+ { return const_iterator(data()); }
iterator
end() noexcept
- { return iterator(std::__addressof(_M_instance[_Nm])); }
+ { return iterator(data() + _Nm); }
const_iterator
end() const noexcept
- { return const_iterator(std::__addressof(_M_instance[_Nm])); }
+ { return const_iterator(data() + _Nm); }
reverse_iterator
rbegin() noexcept
@@ -195,11 +195,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
back() const
{ return _Nm ? *(end() - 1) : *end(); }
- _Tp*
+ pointer
data() noexcept
{ return std::__addressof(_M_instance[0]); }
- const _Tp*
+ const_pointer
data() const noexcept
{ return std::__addressof(_M_instance[0]); }
};