diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-14 18:35:21 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-14 18:35:21 +0000 |
commit | b368ada25fad9cc941cacfd0dc2be98bd3de1604 (patch) | |
tree | 2f508d04ccaa16c83b72fa7199962c702b746c28 /libstdc++-v3 | |
parent | a721131d19a89ba70f8edbe5705ae0aebe40267b (diff) | |
download | ppe42-gcc-b368ada25fad9cc941cacfd0dc2be98bd3de1604.tar.gz ppe42-gcc-b368ada25fad9cc941cacfd0dc2be98bd3de1604.zip |
2004-09-14 Paolo Carlini <pcarlini@suse.de>
* include/bits/cpp_type_traits.h: Rename __is_trivially_copyable
to __is_scalar, more clear and consistent with "tr1" naming.
* include/bits/stl_algobase.h: Update consistently throughout.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87497 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/cpp_type_traits.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_algobase.h | 12 |
3 files changed, 14 insertions, 8 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 16faad2e92c..79919512177 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2004-09-14 Paolo Carlini <pcarlini@suse.de> + + * include/bits/cpp_type_traits.h: Rename __is_trivially_copyable + to __is_scalar, more clear and consistent with "tr1" naming. + * include/bits/stl_algobase.h: Update consistently throughout. + 2004-09-13 Paolo Carlini <pcarlini@suse.de> PR libstdc++/11722 diff --git a/libstdc++-v3/include/bits/cpp_type_traits.h b/libstdc++-v3/include/bits/cpp_type_traits.h index feb7b1c93e8..81a1dce7b5b 100644 --- a/libstdc++-v3/include/bits/cpp_type_traits.h +++ b/libstdc++-v3/include/bits/cpp_type_traits.h @@ -378,10 +378,10 @@ namespace std }; // - // A trivially copyable type is an arithmetic type or a pointer type + // A scalar type is an arithmetic type or a pointer type // template<typename _Tp> - struct __is_trivially_copyable + struct __is_scalar { enum { diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h index b0502da7964..f3f20e66802 100644 --- a/libstdc++-v3/include/bits/stl_algobase.h +++ b/libstdc++-v3/include/bits/stl_algobase.h @@ -274,7 +274,7 @@ namespace std typedef typename iterator_traits<_II>::value_type _ValueTypeI; typedef typename iterator_traits<_OI>::value_type _ValueTypeO; typedef typename iterator_traits<_II>::iterator_category _Category; - const bool __simple = (__is_trivially_copyable<_ValueTypeI>::_M_type + const bool __simple = (__is_scalar<_ValueTypeI>::_M_type && __is_pointer<_II>::_M_type && __is_pointer<_OI>::_M_type && __are_same<_ValueTypeI, _ValueTypeO>::_M_type); @@ -399,7 +399,7 @@ namespace std typedef typename iterator_traits<_BI1>::value_type _ValueType1; typedef typename iterator_traits<_BI2>::value_type _ValueType2; typedef typename iterator_traits<_BI1>::iterator_category _Category; - const bool __simple = (__is_trivially_copyable<_ValueType1>::_M_type + const bool __simple = (__is_scalar<_ValueType1>::_M_type && __is_pointer<_BI1>::_M_type && __is_pointer<_BI2>::_M_type && __are_same<_ValueType1, _ValueType2>::_M_type); @@ -529,8 +529,8 @@ namespace std _ForwardIterator>) __glibcxx_requires_valid_range(__first, __last); - const bool __trivial = __is_trivially_copyable<_Tp>::_M_type; - std::__fill<__trivial>::fill(__first, __last, __value); + const bool __scalar = __is_scalar<_Tp>::_M_type; + std::__fill<__scalar>::fill(__first, __last, __value); } // Specialization: for one-byte types we can use memset. @@ -603,8 +603,8 @@ namespace std // concept requirements __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator, _Tp>) - const bool __trivial = __is_trivially_copyable<_Tp>::_M_type; - return std::__fill_n<__trivial>::fill_n(__first, __n, __value); + const bool __scalar = __is_scalar<_Tp>::_M_type; + return std::__fill_n<__scalar>::fill_n(__first, __n, __value); } template<typename _Size> |