From: paolo Date: Fri, 12 Mar 2004 23:32:03 +0000 (+0000) Subject: 2004-03-12 Paolo Carlini X-Git-Url: http://git.sourceforge.jp/view?a=commitdiff_plain;h=aba89f4de01260f5885ed913dc69231ea613436b;p=pf3gnuchains%2Fgcc-fork.git 2004-03-12 Paolo Carlini * docs/html/ext/howto.html: Add entry for DR 253 [Ready]. * include/bits/gslice_array.h: Add comment about DR 253. * include/bits/indirect_array.h: Likewise. * include/bits/mask_array.h: Likewise. * include/bits/slice_array.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79412 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 6f53566c475..5e93b5e6a12 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2004-03-12 Paolo Carlini + + * docs/html/ext/howto.html: Add entry for DR 253 [Ready]. + * include/bits/gslice_array.h: Add comment about DR 253. + * include/bits/indirect_array.h: Likewise. + * include/bits/mask_array.h: Likewise. + * include/bits/slice_array.h: Likewise. + 2004-03-12 Benjamin Kosnik * testsuite/20_util/allocator/14176.cc: New. diff --git a/libstdc++-v3/docs/html/ext/howto.html b/libstdc++-v3/docs/html/ext/howto.html index 682b34e3b62..f17c6173c08 100644 --- a/libstdc++-v3/docs/html/ext/howto.html +++ b/libstdc++-v3/docs/html/ext/howto.html @@ -412,6 +412,14 @@
This nested typdef was originally not specified.
+
253: + valarray helper functions are almost entirely useless +
+
Make the copy constructor and copy-assignment operator declarations + public in gslice_array, indirect_array, mask_array, slice_array; provide + definitions. +
+
265: std::pair::pair() effects overly restrictive
diff --git a/libstdc++-v3/include/bits/gslice_array.h b/libstdc++-v3/include/bits/gslice_array.h index e50a74dc2bb..7e2e6848e88 100644 --- a/libstdc++-v3/include/bits/gslice_array.h +++ b/libstdc++-v3/include/bits/gslice_array.h @@ -61,11 +61,12 @@ namespace std { public: typedef _Tp value_type; - // this constructor needs to be implemented. + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 253. valarray helper functions are almost entirely useless + /// Copy constructor. Both slices refer to the same underlying array. gslice_array(const gslice_array&); - // This operator must be public. See DR-253. /// Assignment operator. Assigns slice elements to corresponding /// elements of @a a. gslice_array& operator=(const gslice_array&); @@ -134,13 +135,13 @@ namespace std { inline gslice_array<_Tp>::gslice_array(_Array<_Tp> __a, const valarray& __i) - : _M_array(__a), _M_index(__i) {} + : _M_array(__a), _M_index(__i) {} template inline gslice_array<_Tp>::gslice_array(const gslice_array<_Tp>& __a) - : _M_array(__a._M_array), _M_index(__a._M_index) {} + : _M_array(__a._M_array), _M_index(__a._M_index) {} template diff --git a/libstdc++-v3/include/bits/indirect_array.h b/libstdc++-v3/include/bits/indirect_array.h index 1f4a71377d4..912f522450d 100644 --- a/libstdc++-v3/include/bits/indirect_array.h +++ b/libstdc++-v3/include/bits/indirect_array.h @@ -63,11 +63,12 @@ namespace std public: typedef _Tp value_type; - // this constructor needs to be implemented. + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 253. valarray helper functions are almost entirely useless + /// Copy constructor. Both slices refer to the same underlying array. indirect_array(const indirect_array&); - // XXX: This is a proposed resolution for DR-253. /// Assignment operator. Assigns elements to corresponding elements /// of @a a. indirect_array& operator=(const indirect_array&); @@ -139,13 +140,13 @@ namespace std template inline indirect_array<_Tp>::indirect_array(const indirect_array<_Tp>& __a) - : _M_sz(__a._M_sz), _M_index(__a._M_index), _M_array(__a._M_array) {} + : _M_sz(__a._M_sz), _M_index(__a._M_index), _M_array(__a._M_array) {} template inline indirect_array<_Tp>::indirect_array(_Array<_Tp> __a, size_t __s, _Array __i) - : _M_sz(__s), _M_index(__i), _M_array(__a) {} + : _M_sz(__s), _M_index(__i), _M_array(__a) {} template inline indirect_array<_Tp>& diff --git a/libstdc++-v3/include/bits/mask_array.h b/libstdc++-v3/include/bits/mask_array.h index 4faa5d763bb..1a694f3c61f 100644 --- a/libstdc++-v3/include/bits/mask_array.h +++ b/libstdc++-v3/include/bits/mask_array.h @@ -63,11 +63,12 @@ namespace std { public: typedef _Tp value_type; - // this constructor needs to be implemented. + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 253. valarray helper functions are almost entirely useless + /// Copy constructor. Both slices refer to the same underlying array. mask_array (const mask_array&); - // This operator must be public. See DR-253. /// Assignment operator. Assigns elements to corresponding elements /// of @a a. mask_array& operator=(const mask_array&); @@ -136,12 +137,12 @@ namespace std { template inline mask_array<_Tp>::mask_array(const mask_array<_Tp>& a) - : _M_sz(a._M_sz), _M_mask(a._M_mask), _M_array(a._M_array) {} + : _M_sz(a._M_sz), _M_mask(a._M_mask), _M_array(a._M_array) {} template inline mask_array<_Tp>::mask_array(_Array<_Tp> __a, size_t __s, _Array __m) - : _M_sz(__s), _M_mask(__m), _M_array(__a) {} + : _M_sz(__s), _M_mask(__m), _M_array(__a) {} template inline mask_array<_Tp>& diff --git a/libstdc++-v3/include/bits/slice_array.h b/libstdc++-v3/include/bits/slice_array.h index 571296d9c57..31c89bcdb61 100644 --- a/libstdc++-v3/include/bits/slice_array.h +++ b/libstdc++-v3/include/bits/slice_array.h @@ -123,11 +123,12 @@ namespace std public: typedef _Tp value_type; - // This constructor is implemented since we need to return a value. + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 253. valarray helper functions are almost entirely useless + /// Copy constructor. Both slices refer to the same underlying array. slice_array(const slice_array&); - // This operator must be public. See DR-253. /// Assignment operator. Assigns slice elements to corresponding /// elements of @a a. slice_array& operator=(const slice_array&); @@ -196,13 +197,13 @@ namespace std template inline slice_array<_Tp>::slice_array(_Array<_Tp> __a, const slice& __s) - : _M_sz(__s.size()), _M_stride(__s.stride()), - _M_array(__a.begin() + __s.start()) {} + : _M_sz(__s.size()), _M_stride(__s.stride()), + _M_array(__a.begin() + __s.start()) {} template inline slice_array<_Tp>::slice_array(const slice_array<_Tp>& a) - : _M_sz(a._M_sz), _M_stride(a._M_stride), _M_array(a._M_array) {} + : _M_sz(a._M_sz), _M_stride(a._M_stride), _M_array(a._M_array) {} // template // inline slice_array<_Tp>::~slice_array () {}