This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

V3 PATCH: Move slice definition into slice_array.h


Applied to mainline.  Regression tested on an i686-pc-linux-gnu.

-- Gaby

2002-07-16  Gabriel Dos Reis  <gdr@nerim.net>

	* include/Makefile.am (bits_headers): Remove slice.h
	* include/Makefile.in: Regenerate.
	* include/bits/slice.h (slice): move to include/bits/slice_array.h
	* include/bits/slice.h Remove.
	* include/std/std_valarray.h: Don't #include bits/slice.h anymore.
	* include/bits/slice_array.h: Comply to official coding styles.
	* testsuite/26_numerics/slice.cc: New test.

Index: include/Makefile.am
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/Makefile.am,v
retrieving revision 1.39
diff -p -r1.39 Makefile.am
*** include/Makefile.am	1 Jul 2002 19:58:41 -0000	1.39
--- include/Makefile.am	16 Jul 2002 00:18:17 -0000
*************** bits_headers = \
*** 62,68 ****
  	${bits_srcdir}/pthread_allocimpl.h \
  	${bits_srcdir}/stream_iterator.h \
  	${bits_srcdir}/streambuf_iterator.h \
- 	${bits_srcdir}/slice.h \
  	${bits_srcdir}/slice_array.h \
  	${bits_srcdir}/sstream.tcc \
  	${bits_srcdir}/stl_algo.h \
--- 62,67 ----
Index: include/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/Makefile.in,v
retrieving revision 1.52
diff -p -r1.52 Makefile.in
*** include/Makefile.in	1 Jul 2002 19:58:41 -0000	1.52
--- include/Makefile.in	16 Jul 2002 00:18:17 -0000
*************** glibcpp_builddir = @glibcpp_builddir@
*** 139,446 ****
  
  bits_srcdir = ${glibcpp_srcdir}/include/bits
  bits_builddir = ./bits
! bits_headers = \
! 	${bits_srcdir}/basic_ios.h \
! 	${bits_srcdir}/basic_ios.tcc \
! 	${bits_srcdir}/basic_string.h \
! 	${bits_srcdir}/basic_string.tcc \
! 	${bits_srcdir}/boost_concept_check.h \
! 	${bits_srcdir}/char_traits.h \
! 	${bits_srcdir}/codecvt.h \
! 	${bits_srcdir}/concept_check.h \
! 	${bits_srcdir}/cpp_type_traits.h \
! 	${bits_srcdir}/deque.tcc \
! 	${bits_srcdir}/fpos.h \
! 	${bits_srcdir}/fstream.tcc \
! 	${bits_srcdir}/functexcept.h \
! 	${bits_srcdir}/generic_shadow.h \
! 	${bits_srcdir}/gslice.h \
! 	${bits_srcdir}/gslice_array.h \
! 	${bits_srcdir}/indirect_array.h \
! 	${bits_srcdir}/ios_base.h \
! 	${bits_srcdir}/istream.tcc \
! 	${bits_srcdir}/list.tcc \
! 	${bits_srcdir}/locale_facets.h \
! 	${bits_srcdir}/locale_facets.tcc \
! 	${bits_srcdir}/localefwd.h \
! 	${bits_srcdir}/mask_array.h \
! 	${bits_srcdir}/ostream.tcc \
! 	${bits_srcdir}/pthread_allocimpl.h \
! 	${bits_srcdir}/stream_iterator.h \
! 	${bits_srcdir}/streambuf_iterator.h \
! 	${bits_srcdir}/slice.h \
! 	${bits_srcdir}/slice_array.h \
! 	${bits_srcdir}/sstream.tcc \
! 	${bits_srcdir}/stl_algo.h \
! 	${bits_srcdir}/stl_algobase.h \
! 	${bits_srcdir}/stl_alloc.h \
! 	${bits_srcdir}/stl_bvector.h \
! 	${bits_srcdir}/stl_construct.h \
! 	${bits_srcdir}/stl_deque.h \
! 	${bits_srcdir}/stl_function.h \
! 	${bits_srcdir}/stl_heap.h \
! 	${bits_srcdir}/stl_iterator.h \
! 	${bits_srcdir}/stl_iterator_base_funcs.h \
! 	${bits_srcdir}/stl_iterator_base_types.h \
! 	${bits_srcdir}/stl_list.h \
! 	${bits_srcdir}/stl_map.h \
! 	${bits_srcdir}/stl_multimap.h \
! 	${bits_srcdir}/stl_multiset.h \
! 	${bits_srcdir}/stl_numeric.h \
! 	${bits_srcdir}/stl_pair.h \
! 	${bits_srcdir}/stl_pthread_alloc.h \
! 	${bits_srcdir}/stl_queue.h \
! 	${bits_srcdir}/stl_raw_storage_iter.h \
! 	${bits_srcdir}/stl_relops.h \
! 	${bits_srcdir}/stl_set.h \
! 	${bits_srcdir}/stl_stack.h \
! 	${bits_srcdir}/stl_tempbuf.h \
! 	${bits_srcdir}/stl_threads.h \
! 	${bits_srcdir}/stl_tree.h \
! 	${bits_srcdir}/stl_uninitialized.h \
! 	${bits_srcdir}/stl_vector.h \
! 	${bits_srcdir}/streambuf.tcc \
! 	${bits_srcdir}/stringfwd.h \
! 	${bits_srcdir}/type_traits.h \
! 	${bits_srcdir}/valarray_array.h \
! 	${bits_srcdir}/valarray_array.tcc \
! 	${bits_srcdir}/valarray_meta.h \
! 	${bits_srcdir}/vector.tcc
  
  
  backward_srcdir = ${glibcpp_srcdir}/include/backward
  backward_builddir = ./backward
! backward_headers = \
! 	${backward_srcdir}/complex.h \
! 	${backward_srcdir}/iomanip.h \
! 	${backward_srcdir}/istream.h \
! 	${backward_srcdir}/ostream.h \
! 	${backward_srcdir}/stream.h \
! 	${backward_srcdir}/streambuf.h \
! 	${backward_srcdir}/algo.h \
! 	${backward_srcdir}/algobase.h \
! 	${backward_srcdir}/alloc.h \
! 	${backward_srcdir}/bvector.h \
! 	${backward_srcdir}/defalloc.h \
! 	${backward_srcdir}/deque.h \
! 	${backward_srcdir}/function.h \
! 	${backward_srcdir}/hash_map.h \
! 	${backward_srcdir}/hash_set.h \
! 	${backward_srcdir}/hashtable.h \
! 	${backward_srcdir}/heap.h \
! 	${backward_srcdir}/iostream.h \
! 	${backward_srcdir}/iterator.h \
! 	${backward_srcdir}/list.h \
! 	${backward_srcdir}/map.h \
! 	${backward_srcdir}/multimap.h \
! 	${backward_srcdir}/new.h \
! 	${backward_srcdir}/multiset.h \
! 	${backward_srcdir}/pair.h \
! 	${backward_srcdir}/queue.h \
! 	${backward_srcdir}/rope.h \
! 	${backward_srcdir}/set.h \
! 	${backward_srcdir}/slist.h \
! 	${backward_srcdir}/stack.h \
! 	${backward_srcdir}/tempbuf.h \
! 	${backward_srcdir}/tree.h \
! 	${backward_srcdir}/vector.h \
! 	${backward_srcdir}/fstream.h \
! 	${backward_srcdir}/strstream.h \
! 	${backward_srcdir}/backward_warning.h
  
  
  ext_srcdir = ${glibcpp_srcdir}/include/ext
  ext_builddir = ./ext
! ext_headers = \
! 	${ext_srcdir}/algorithm \
! 	${ext_srcdir}/enc_filebuf.h \
! 	${ext_srcdir}/stdio_filebuf.h \
! 	${ext_srcdir}/functional \
! 	${ext_srcdir}/hash_map \
! 	${ext_srcdir}/hash_set \
! 	${ext_srcdir}/iterator \
! 	${ext_srcdir}/memory \
! 	${ext_srcdir}/numeric \
! 	${ext_srcdir}/rb_tree \
! 	${ext_srcdir}/rope \
! 	${ext_srcdir}/ropeimpl.h \
! 	${ext_srcdir}/slist \
! 	${ext_srcdir}/stl_hash_fun.h \
! 	${ext_srcdir}/stl_hashtable.h \
! 	${ext_srcdir}/stl_rope.h
  
  
  # This is the common subset of files that all three "C" header models use.
  c_base_srcdir = @C_INCLUDE_DIR@
  c_base_builddir = .
! c_base_headers = \
! 	${c_base_srcdir}/std_cassert.h \
! 	${c_base_srcdir}/std_cctype.h \
! 	${c_base_srcdir}/std_cerrno.h \
! 	${c_base_srcdir}/std_cfloat.h \
! 	${c_base_srcdir}/std_ciso646.h \
! 	${c_base_srcdir}/std_climits.h \
! 	${c_base_srcdir}/std_clocale.h \
! 	${c_base_srcdir}/std_cmath.h \
! 	${c_base_srcdir}/std_csetjmp.h \
! 	${c_base_srcdir}/std_csignal.h \
! 	${c_base_srcdir}/std_cstdarg.h \
! 	${c_base_srcdir}/std_cstddef.h \
! 	${c_base_srcdir}/std_cstdio.h \
! 	${c_base_srcdir}/std_cstdlib.h \
! 	${c_base_srcdir}/std_cstring.h \
! 	${c_base_srcdir}/std_ctime.h \
! 	${c_base_srcdir}/std_cwchar.h \
! 	${c_base_srcdir}/std_cwctype.h 
! 
! c_base_headers_rename = \
! 	cassert \
! 	cctype \
! 	cerrno \
! 	cfloat \
! 	ciso646 \
! 	climits \
! 	clocale \
! 	cmath \
! 	csetjmp \
! 	csignal \
! 	cstdarg \
! 	cstddef \
! 	cstdio \
! 	cstdlib \
! 	cstring \
! 	ctime \
! 	cwchar \
! 	cwctype 
  
  
  # "C" compatibility headers.
  c_compatibility_srcdir = ${glibcpp_srcdir}/include/c_compatibility
  c_compatibility_builddir = .
! c_compatibility_headers = \
! 	${c_compatibility_srcdir}/assert.h \
! 	${c_compatibility_srcdir}/ctype.h \
! 	${c_compatibility_srcdir}/errno.h \
! 	${c_compatibility_srcdir}/float.h \
! 	${c_compatibility_srcdir}/iso646.h \
! 	${c_compatibility_srcdir}/limits.h \
! 	${c_compatibility_srcdir}/locale.h \
! 	${c_compatibility_srcdir}/math.h \
! 	${c_compatibility_srcdir}/setjmp.h \
! 	${c_compatibility_srcdir}/signal.h \
! 	${c_compatibility_srcdir}/stdarg.h \
! 	${c_compatibility_srcdir}/stddef.h \
! 	${c_compatibility_srcdir}/stdio.h \
! 	${c_compatibility_srcdir}/stdlib.h \
! 	${c_compatibility_srcdir}/string.h \
! 	${c_compatibility_srcdir}/time.h \
! 	${c_compatibility_srcdir}/wchar.h \
! 	${c_compatibility_srcdir}/wctype.h 
  
! @GLIBCPP_C_HEADERS_C_STD_TRUE@c_base_headers_extra = @GLIBCPP_C_HEADERS_C_STD_TRUE@${c_base_srcdir}/cmath.tcc 
  @GLIBCPP_C_HEADERS_C_STD_FALSE@c_base_headers_extra = 
! @GLIBCPP_C_HEADERS_COMPATIBILITY_TRUE@c_compatibility_headers_extra = @GLIBCPP_C_HEADERS_COMPATIBILITY_TRUE@${c_compatibility_headers}
  @GLIBCPP_C_HEADERS_COMPATIBILITY_FALSE@c_compatibility_headers_extra = 
  
  std_srcdir = ${glibcpp_srcdir}/include/std
  std_builddir = .
! std_headers = \
! 	${std_srcdir}/std_algorithm.h \
! 	${std_srcdir}/std_bitset.h \
! 	${std_srcdir}/std_complex.h \
! 	${std_srcdir}/std_deque.h \
! 	${std_srcdir}/std_fstream.h \
! 	${std_srcdir}/std_functional.h \
! 	${std_srcdir}/std_iomanip.h \
! 	${std_srcdir}/std_ios.h \
! 	${std_srcdir}/std_iosfwd.h \
! 	${std_srcdir}/std_iostream.h \
! 	${std_srcdir}/std_istream.h \
! 	${std_srcdir}/std_iterator.h \
! 	${std_srcdir}/std_limits.h \
! 	${std_srcdir}/std_list.h \
! 	${std_srcdir}/std_locale.h \
! 	${std_srcdir}/std_map.h \
! 	${std_srcdir}/std_memory.h \
! 	${std_srcdir}/std_numeric.h \
! 	${std_srcdir}/std_ostream.h \
! 	${std_srcdir}/std_queue.h \
! 	${std_srcdir}/std_set.h \
! 	${std_srcdir}/std_sstream.h \
! 	${std_srcdir}/std_stack.h \
! 	${std_srcdir}/std_stdexcept.h \
! 	${std_srcdir}/std_streambuf.h \
! 	${std_srcdir}/std_string.h \
! 	${std_srcdir}/std_utility.h \
! 	${std_srcdir}/std_valarray.h \
! 	${std_srcdir}/std_vector.h
  
  # Renamed at build time. 
! std_headers_rename = \
! 	algorithm \
! 	bitset \
! 	complex \
! 	deque \
! 	fstream \
! 	functional \
! 	iomanip \
! 	ios \
! 	iosfwd \
! 	iostream \
! 	istream \
! 	iterator \
! 	limits \
! 	list \
! 	locale \
! 	map \
! 	memory \
! 	numeric \
! 	ostream \
! 	queue \
! 	set \
! 	sstream \
! 	stack \
! 	stdexcept \
! 	streambuf \
! 	string \
! 	utility \
! 	valarray \
! 	vector
  
  
  target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@
  target_builddir = ./${target_alias}/bits
! target_headers = \
! 	${target_srcdir}/ctype_base.h \
! 	${target_srcdir}/ctype_inline.h \
! 	${target_srcdir}/ctype_noninline.h \
! 	${target_srcdir}/os_defines.h \
! 	${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h \
! 	${glibcpp_srcdir}/@CPU_LIMITS_INC_SRCDIR@/cpu_limits.h 
  
  # These target_headers_extra files are all built with ad hoc naming rules.
! target_headers_extra = \
! 	${target_builddir}/basic_file.h \
! 	${target_builddir}/c++config.h \
! 	${target_builddir}/c++io.h \
! 	${target_builddir}/c++locale.h \
! 	${target_builddir}/messages_members.h \
! 	${target_builddir}/codecvt_specializations.h
  
  
! thread_target_headers = \
! 	${target_builddir}/gthr.h \
! 	${target_builddir}/gthr-single.h \
! 	${target_builddir}/gthr-posix.h \
! 	${target_builddir}/gthr-default.h
  
  
  # List of all timestamp files.  By keeping only one copy of this list, both
  # CLEANFILES and all-local are kept up-to-date.
! allstamps = \
! 	stamp-std stamp-bits stamp-c_base stamp-c_compatibility \
! 	stamp-backward stamp-ext \
! 	${target_builddir}/stamp-target
  
  
  # Target includes for threads
--- 139,197 ----
  
  bits_srcdir = ${glibcpp_srcdir}/include/bits
  bits_builddir = ./bits
! bits_headers =  	${bits_srcdir}/basic_ios.h 	${bits_srcdir}/basic_ios.tcc 	${bits_srcdir}/basic_string.h 	${bits_srcdir}/basic_string.tcc 	${bits_srcdir}/boost_concept_check.h 	${bits_srcdir}/char_traits.h 	${bits_srcdir}/codecvt.h 	${bits_srcdir}/concept_check.h 	${bits_srcdir}/cpp_type_traits.h 	${bits_srcdir}/deque.tcc 	${bits_srcdir}/fpos.h 	${bits_srcdir}/fstream.tcc 	${bits_srcdir}/functexcept.h 	${bits_srcdir}/generic_shadow.h 	${bits_srcdir}/gslice.h 	${bits_srcdir}/gslice_array.h 	${bits_srcdir}/indirect_array.h 	${bits_srcdir}/ios_base.h 	${bits_srcdir}/istream.tcc 	${bits_srcdir}/list.tcc 	${bits_srcdir}/locale_facets.h 	${bits_srcdir}/locale_facets.tcc 	${bits_srcdir}/localefwd.h 	${bits_srcdir}/mask_array.h 	${bits_srcdir}/ostream.tcc 	${bits_srcdir}/pthread_allocimpl.h 	${bits_srcdir}/stream_iterator.h 	${bits_srcdir}/streambuf_iterator.h 	${bits_srcdir}/slice_array.h 	${bits_srcdir}/sstream.tcc 	${bits_srcdir}/stl_algo.h 	${bits_srcdir}/stl_algobase.h 	${bit!
 s_srcdir}/stl_alloc.h 	${bits_srcdir}/stl_bvector.h 	${bits_srcdir}/stl_construct.h 	${bits_srcdir}/stl_deque.h 	${bits_srcdir}/stl_function.h 	${bits_srcdir}/stl_heap.h 	${bits_srcdir}/stl_iterator.h 	${bits_srcdir}/stl_iterator_base_funcs.h 	${bits_srcdir}/stl_iterator_base_types.h 	${bits_srcdir}/stl_list.h 	${bits_srcdir}/stl_map.h 	${bits_srcdir}/stl_multimap.h 	${bits_srcdir}/stl_multiset.h 	${bits_srcdir}/stl_numeric.h 	${bits_srcdir}/stl_pair.h 	${bits_srcdir}/stl_pthread_alloc.h 	${bits_srcdir}/stl_queue.h 	${bits_srcdir}/stl_raw_storage_iter.h 	${bits_srcdir}/stl_relops.h 	${bits_srcdir}/stl_set.h 	${bits_srcdir}/stl_stack.h 	${bits_srcdir}/stl_tempbuf.h 	${bits_srcdir}/stl_threads.h 	${bits_srcdir}/stl_tree.h 	${bits_srcdir}/stl_uninitialized.h 	${bits_srcdir}/stl_vector.h 	${bits_srcdir}/streambuf.tcc 	${bits_srcdir}/stringfwd.h 	${bits_srcdir}/type_traits.h 	${bits_srcdir}/valarray_array.h 	${bits_srcdir}/valarray_array.tcc 	${bits_srcdir}/valarray_meta.h 	${bi!
 ts_srcdir}/vector.tcc
  
  
  backward_srcdir = ${glibcpp_srcdir}/include/backward
  backward_builddir = ./backward
! backward_headers =  	${backward_srcdir}/complex.h 	${backward_srcdir}/iomanip.h 	${backward_srcdir}/istream.h 	${backward_srcdir}/ostream.h 	${backward_srcdir}/stream.h 	${backward_srcdir}/streambuf.h 	${backward_srcdir}/algo.h 	${backward_srcdir}/algobase.h 	${backward_srcdir}/alloc.h 	${backward_srcdir}/bvector.h 	${backward_srcdir}/defalloc.h 	${backward_srcdir}/deque.h 	${backward_srcdir}/function.h 	${backward_srcdir}/hash_map.h 	${backward_srcdir}/hash_set.h 	${backward_srcdir}/hashtable.h 	${backward_srcdir}/heap.h 	${backward_srcdir}/iostream.h 	${backward_srcdir}/iterator.h 	${backward_srcdir}/list.h 	${backward_srcdir}/map.h 	${backward_srcdir}/multimap.h 	${backward_srcdir}/new.h 	${backward_srcdir}/multiset.h 	${backward_srcdir}/pair.h 	${backward_srcdir}/queue.h 	${backward_srcdir}/rope.h 	${backward_srcdir}/set.h 	${backward_srcdir}/slist.h 	${backward_srcdir}/stack.h 	${backward_srcdir}/tempbuf.h 	${backward_srcdir}/tree.h 	${backward_srcdir}/vector.h 	${bac!
 kward_srcdir}/fstream.h 	${backward_srcdir}/strstream.h 	${backward_srcdir}/backward_warning.h
  
  
  ext_srcdir = ${glibcpp_srcdir}/include/ext
  ext_builddir = ./ext
! ext_headers =  	${ext_srcdir}/algorithm 	${ext_srcdir}/enc_filebuf.h 	${ext_srcdir}/stdio_filebuf.h 	${ext_srcdir}/functional 	${ext_srcdir}/hash_map 	${ext_srcdir}/hash_set 	${ext_srcdir}/iterator 	${ext_srcdir}/memory 	${ext_srcdir}/numeric 	${ext_srcdir}/rb_tree 	${ext_srcdir}/rope 	${ext_srcdir}/ropeimpl.h 	${ext_srcdir}/slist 	${ext_srcdir}/stl_hash_fun.h 	${ext_srcdir}/stl_hashtable.h 	${ext_srcdir}/stl_rope.h
  
  
  # This is the common subset of files that all three "C" header models use.
  c_base_srcdir = @C_INCLUDE_DIR@
  c_base_builddir = .
! c_base_headers =  	${c_base_srcdir}/std_cassert.h 	${c_base_srcdir}/std_cctype.h 	${c_base_srcdir}/std_cerrno.h 	${c_base_srcdir}/std_cfloat.h 	${c_base_srcdir}/std_ciso646.h 	${c_base_srcdir}/std_climits.h 	${c_base_srcdir}/std_clocale.h 	${c_base_srcdir}/std_cmath.h 	${c_base_srcdir}/std_csetjmp.h 	${c_base_srcdir}/std_csignal.h 	${c_base_srcdir}/std_cstdarg.h 	${c_base_srcdir}/std_cstddef.h 	${c_base_srcdir}/std_cstdio.h 	${c_base_srcdir}/std_cstdlib.h 	${c_base_srcdir}/std_cstring.h 	${c_base_srcdir}/std_ctime.h 	${c_base_srcdir}/std_cwchar.h 	${c_base_srcdir}/std_cwctype.h 
! 
! c_base_headers_rename =  	cassert 	cctype 	cerrno 	cfloat 	ciso646 	climits 	clocale 	cmath 	csetjmp 	csignal 	cstdarg 	cstddef 	cstdio 	cstdlib 	cstring 	ctime 	cwchar 	cwctype 
  
  
  # "C" compatibility headers.
  c_compatibility_srcdir = ${glibcpp_srcdir}/include/c_compatibility
  c_compatibility_builddir = .
! c_compatibility_headers =  	${c_compatibility_srcdir}/assert.h 	${c_compatibility_srcdir}/ctype.h 	${c_compatibility_srcdir}/errno.h 	${c_compatibility_srcdir}/float.h 	${c_compatibility_srcdir}/iso646.h 	${c_compatibility_srcdir}/limits.h 	${c_compatibility_srcdir}/locale.h 	${c_compatibility_srcdir}/math.h 	${c_compatibility_srcdir}/setjmp.h 	${c_compatibility_srcdir}/signal.h 	${c_compatibility_srcdir}/stdarg.h 	${c_compatibility_srcdir}/stddef.h 	${c_compatibility_srcdir}/stdio.h 	${c_compatibility_srcdir}/stdlib.h 	${c_compatibility_srcdir}/string.h 	${c_compatibility_srcdir}/time.h 	${c_compatibility_srcdir}/wchar.h 	${c_compatibility_srcdir}/wctype.h 
  
! @GLIBCPP_C_HEADERS_C_STD_TRUE@c_base_headers_extra = ${c_base_srcdir}/cmath.tcc 
  @GLIBCPP_C_HEADERS_C_STD_FALSE@c_base_headers_extra = 
! @GLIBCPP_C_HEADERS_COMPATIBILITY_TRUE@c_compatibility_headers_extra = ${c_compatibility_headers}
  @GLIBCPP_C_HEADERS_COMPATIBILITY_FALSE@c_compatibility_headers_extra = 
  
  std_srcdir = ${glibcpp_srcdir}/include/std
  std_builddir = .
! std_headers =  	${std_srcdir}/std_algorithm.h 	${std_srcdir}/std_bitset.h 	${std_srcdir}/std_complex.h 	${std_srcdir}/std_deque.h 	${std_srcdir}/std_fstream.h 	${std_srcdir}/std_functional.h 	${std_srcdir}/std_iomanip.h 	${std_srcdir}/std_ios.h 	${std_srcdir}/std_iosfwd.h 	${std_srcdir}/std_iostream.h 	${std_srcdir}/std_istream.h 	${std_srcdir}/std_iterator.h 	${std_srcdir}/std_limits.h 	${std_srcdir}/std_list.h 	${std_srcdir}/std_locale.h 	${std_srcdir}/std_map.h 	${std_srcdir}/std_memory.h 	${std_srcdir}/std_numeric.h 	${std_srcdir}/std_ostream.h 	${std_srcdir}/std_queue.h 	${std_srcdir}/std_set.h 	${std_srcdir}/std_sstream.h 	${std_srcdir}/std_stack.h 	${std_srcdir}/std_stdexcept.h 	${std_srcdir}/std_streambuf.h 	${std_srcdir}/std_string.h 	${std_srcdir}/std_utility.h 	${std_srcdir}/std_valarray.h 	${std_srcdir}/std_vector.h
  
  # Renamed at build time. 
! std_headers_rename =  	algorithm 	bitset 	complex 	deque 	fstream 	functional 	iomanip 	ios 	iosfwd 	iostream 	istream 	iterator 	limits 	list 	locale 	map 	memory 	numeric 	ostream 	queue 	set 	sstream 	stack 	stdexcept 	streambuf 	string 	utility 	valarray 	vector
  
  
  target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@
  target_builddir = ./${target_alias}/bits
! target_headers =  	${target_srcdir}/ctype_base.h 	${target_srcdir}/ctype_inline.h 	${target_srcdir}/ctype_noninline.h 	${target_srcdir}/os_defines.h 	${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h 	${glibcpp_srcdir}/@CPU_LIMITS_INC_SRCDIR@/cpu_limits.h 
  
  # These target_headers_extra files are all built with ad hoc naming rules.
! target_headers_extra =  	${target_builddir}/basic_file.h 	${target_builddir}/c++config.h 	${target_builddir}/c++io.h 	${target_builddir}/c++locale.h 	${target_builddir}/messages_members.h 	${target_builddir}/codecvt_specializations.h
  
  
! thread_target_headers =  	${target_builddir}/gthr.h 	${target_builddir}/gthr-single.h 	${target_builddir}/gthr-posix.h 	${target_builddir}/gthr-default.h
  
  
  # List of all timestamp files.  By keeping only one copy of this list, both
  # CLEANFILES and all-local are kept up-to-date.
! allstamps =  	stamp-std stamp-bits stamp-c_base stamp-c_compatibility 	stamp-backward stamp-ext 	${target_builddir}/stamp-target
  
  
  # Target includes for threads
*************** DIST_COMMON =  Makefile.am Makefile.in
*** 463,469 ****
  
  DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
  
! TAR = gtar
  GZIP_ENV = --best
  all: all-redirect
  .SUFFIXES:
--- 214,220 ----
  
  DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
  
! TAR = tar
  GZIP_ENV = --best
  all: all-redirect
  .SUFFIXES:
Index: include/bits/slice.h
===================================================================
RCS file: include/bits/slice.h
diff -N include/bits/slice.h
*** include/bits/slice.h	2 Nov 2001 17:38:10 -0000	1.4
--- /dev/null	1 Jan 1970 00:00:00 -0000
***************
*** 1,85 ****
- // The template and inlines for the -*- C++ -*- slice class.
- 
- // Copyright (C) 1997-1999, 2001 Free Software Foundation, Inc.
- //
- // This file is part of the GNU ISO C++ Library.  This library is free
- // software; you can redistribute it and/or modify it under the
- // terms of the GNU General Public License as published by the
- // Free Software Foundation; either version 2, or (at your option)
- // any later version.
- 
- // This library is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- // GNU General Public License for more details.
- 
- // You should have received a copy of the GNU General Public License along
- // with this library; see the file COPYING.  If not, write to the Free
- // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- // USA.
- 
- // As a special exception, you may use this file as part of a free software
- // library without restriction.  Specifically, if other files instantiate
- // templates or use macros or inline functions from this file, or you compile
- // this file and link it with other files to produce an executable, this
- // file does not by itself cause the resulting executable to be covered by
- // the GNU General Public License.  This exception does not however
- // invalidate any other reasons why the executable file might be covered by
- // the GNU General Public License.
- 
- // Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
- 
- /** @file slice.h
-  *  This is an internal header file, included by other library headers.
-  *  You should not attempt to use it directly.
-  */
- 
- #ifndef _CPP_BITS_SLICE_H
- #define _CPP_BITS_SLICE_H 1
- 
- #pragma GCC system_header
- 
- namespace std
- {
- 
- class slice
- {
- public:
-     slice ();
-     slice (size_t, size_t, size_t);
- 
-     size_t start () const;
-     size_t size () const;
-     size_t stride () const;
- 
- private:
-     size_t _M_off;                      // offset
-     size_t _M_sz;			// size
-     size_t _M_st;			// stride unit
- };
- 
- inline slice::slice () {}
- 
- inline slice::slice (size_t __o, size_t __d, size_t __s)
-         : _M_off (__o), _M_sz (__d), _M_st (__s) {}
- 
- inline size_t
- slice::start () const
-   { return _M_off; }
- 
- inline size_t
- slice::size () const
-   { return _M_sz; }
- 
- inline size_t
- slice::stride () const
-   { return _M_st; }
- 
- } // std::
- 
- 
- #endif /* _CPP_BITS_SLICE_H */
- 
- // Local Variables:
- // mode:c++
- // End:
--- 0 ----
Index: include/bits/slice_array.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/bits/slice_array.h,v
retrieving revision 1.6
diff -p -r1.6 slice_array.h
*** include/bits/slice_array.h	16 Jan 2002 19:57:31 -0000	1.6
--- include/bits/slice_array.h	16 Jul 2002 00:18:17 -0000
***************
*** 1,6 ****
  // The template and inlines for the -*- C++ -*- slice_array class.
  
! // Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
--- 1,6 ----
  // The template and inlines for the -*- C++ -*- slice_array class.
  
! // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
***************
*** 41,160 ****
  
  namespace std
  {
      
!     template<typename _Tp>
      class slice_array
      {
      public:
!         typedef _Tp value_type;
  
        // This constructor is implemented since we need to return a value.
!       slice_array (const slice_array&);
  
        // This operator must be public.  See DR-253.
!       slice_array& operator= (const slice_array&);
  
-         void operator=   (const valarray<_Tp>&) const;
-         void operator*=  (const valarray<_Tp>&) const;
-         void operator/=  (const valarray<_Tp>&) const;
-         void operator%=  (const valarray<_Tp>&) const;
-         void operator+=  (const valarray<_Tp>&) const;
-         void operator-=  (const valarray<_Tp>&) const;
-         void operator^=  (const valarray<_Tp>&) const;
-         void operator&=  (const valarray<_Tp>&) const;
-         void operator|=  (const valarray<_Tp>&) const;
-         void operator<<= (const valarray<_Tp>&) const;
-         void operator>>= (const valarray<_Tp>&) const;
-         void operator= (const _Tp &);
-         //        ~slice_array ();
-         
-         template<class _Dom>
-         void operator=   (const _Expr<_Dom,_Tp>&) const;
-         template<class _Dom>
-         void operator*=  (const _Expr<_Dom,_Tp>&) const;
-         template<class _Dom>
-         void operator/=  (const _Expr<_Dom,_Tp>&) const;
-         template<class _Dom>
-         void operator%=  (const _Expr<_Dom,_Tp>&) const;
-         template<class _Dom>
-         void operator+=  (const _Expr<_Dom,_Tp>&) const;
-         template<class _Dom>
-         void operator-=  (const _Expr<_Dom,_Tp>&) const;
-         template<class _Dom>
-         void operator^=  (const _Expr<_Dom,_Tp>&) const;
-         template<class _Dom>
-         void operator&=  (const _Expr<_Dom,_Tp>&) const;
-         template<class _Dom>
-         void operator|=  (const _Expr<_Dom,_Tp>&) const;
-         template<class _Dom>
-         void operator<<= (const _Expr<_Dom,_Tp>&) const;
-         template<class _Dom>
-         void operator>>= (const _Expr<_Dom,_Tp>&) const;
-         
      private:
!         friend class valarray<_Tp>;
!         slice_array(_Array<_Tp>, const slice&);
!         
!         const size_t     _M_sz;
!         const size_t     _M_stride;
!         const _Array<_Tp> _M_array;
  
!         // not implemented
!         slice_array ();
      };
  
!     template<typename _Tp>
!     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 ()) {}
  
      
!     template<typename _Tp>
!     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) {}
!     
!     //    template<typename _Tp>
!     //    inline slice_array<_Tp>::~slice_array () {}
  
    template<typename _Tp>
!   inline slice_array<_Tp>&
!   slice_array<_Tp>::operator=(const slice_array<_Tp>& __a)
!   {
!     __valarray_copy(_M_array, _M_sz, _M_stride, __a._M_array, __a._M_stride);
!     return *this;
!   }
! 
  
!     template<typename _Tp>
      inline void
!     slice_array<_Tp>::operator= (const _Tp& __t) 
!     { __valarray_fill (_M_array, _M_sz, _M_stride, __t); }
      
!     template<typename _Tp>
      inline void
!     slice_array<_Tp>::operator= (const valarray<_Tp>& __v) const
      { __valarray_copy (_Array<_Tp> (__v), _M_array, _M_sz, _M_stride); }
      
!     template<typename _Tp>
!     template<class _Dom>
      inline void
!     slice_array<_Tp>::operator= (const _Expr<_Dom,_Tp>& __e) const
      { __valarray_copy (__e, _M_sz, _M_array, _M_stride); }
  
  #undef _DEFINE_VALARRAY_OPERATOR
! #define _DEFINE_VALARRAY_OPERATOR(op, name)				\
  template<typename _Tp>							\
  inline void								\
! slice_array<_Tp>::operator op##= (const valarray<_Tp>& __v) const	\
  {									\
!   _Array_augmented_##name (_M_array, _M_sz, _M_stride, _Array<_Tp> (__v));\
  }									\
  									\
  template<typename _Tp> template<class _Dom>				\
  inline void								\
! slice_array<_Tp>::operator op##= (const _Expr<_Dom,_Tp>& __e) const	\
  {									\
!     _Array_augmented_##name (_M_array, _M_stride, __e, _M_sz);		\
  }
          
  
--- 41,196 ----
  
  namespace std
  {
+   class slice
+   {
+   public:
+     slice();
+     slice(size_t, size_t, size_t);
+     
+     size_t start() const;
+     size_t size() const;
+     size_t stride() const;
      
!   private:
!     size_t _M_off;                      // offset
!     size_t _M_sz;			// size
!     size_t _M_st;			// stride unit
!   };
! 
!   // The default constructor constructor is not required to initialize
!   // data members with any meaningful values, so we choose to do nothing.
!   inline 
!   slice::slice() {}
!   
!   inline 
!   slice::slice(size_t __o, size_t __d, size_t __s)
!     : _M_off(__o), _M_sz(__d), _M_st(__s) {}
!   
!   inline size_t
!   slice::start() const
!   { return _M_off; }
!   
!   inline size_t
!   slice::size() const
!   { return _M_sz; }
!   
!   inline size_t
!   slice::stride() const
!   { return _M_st; }
! 
!   template<typename _Tp>
      class slice_array
      {
      public:
!       typedef _Tp value_type;
  
        // This constructor is implemented since we need to return a value.
!       slice_array(const slice_array&);
  
        // This operator must be public.  See DR-253.
!       slice_array& operator=(const slice_array&);
! 
!       void operator=(const valarray<_Tp>&) const;
!       void operator*=(const valarray<_Tp>&) const;
!       void operator/=(const valarray<_Tp>&) const;
!       void operator%=(const valarray<_Tp>&) const;
!       void operator+=(const valarray<_Tp>&) const;
!       void operator-=(const valarray<_Tp>&) const;
!       void operator^=(const valarray<_Tp>&) const;
!       void operator&=(const valarray<_Tp>&) const;
!       void operator|=(const valarray<_Tp>&) const;
!       void operator<<=(const valarray<_Tp>&) const;
!       void operator>>=(const valarray<_Tp>&) const;
!       void operator=(const _Tp &);
!       //        ~slice_array ();
! 
!       template<class _Dom>
! 	void operator=(const _Expr<_Dom,_Tp>&) const;
!       template<class _Dom>
! 	void operator*=(const _Expr<_Dom,_Tp>&) const;
!       template<class _Dom>
! 	void operator/=(const _Expr<_Dom,_Tp>&) const;
!       template<class _Dom>
! 	void operator%=(const _Expr<_Dom,_Tp>&) const;
!       template<class _Dom>
! 	void operator+=(const _Expr<_Dom,_Tp>&) const;
!       template<class _Dom>
! 	void operator-=(const _Expr<_Dom,_Tp>&) const;
!       template<class _Dom>
! 	void operator^=(const _Expr<_Dom,_Tp>&) const;
!       template<class _Dom>
! 	void operator&=(const _Expr<_Dom,_Tp>&) const;
!       template<class _Dom>
! 	void operator|=(const _Expr<_Dom,_Tp>&) const;
!       template<class _Dom>
! 	void operator<<=(const _Expr<_Dom,_Tp>&) const;
!       template<class _Dom>
! 	void operator>>=(const _Expr<_Dom,_Tp>&) const;
  
      private:
!       friend class valarray<_Tp>;
!       slice_array(_Array<_Tp>, const slice&);
! 
!       const size_t     _M_sz;
!       const size_t     _M_stride;
!       const _Array<_Tp> _M_array;
  
!       // not implemented
!       slice_array();
      };
  
!   template<typename _Tp>
!     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()) {}
  
+   template<typename _Tp>
+     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) {}
      
!   //    template<typename _Tp>
!   //    inline slice_array<_Tp>::~slice_array () {}
  
    template<typename _Tp>
!     inline slice_array<_Tp>&
!     slice_array<_Tp>::operator=(const slice_array<_Tp>& __a)
!     {
!       __valarray_copy(_M_array, _M_sz, _M_stride, __a._M_array, __a._M_stride);
!       return *this;
!     }
  
!   template<typename _Tp>
      inline void
!     slice_array<_Tp>::operator=(const _Tp& __t) 
!     { __valarray_fill(_M_array, _M_sz, _M_stride, __t); }
      
!   template<typename _Tp>
      inline void
!     slice_array<_Tp>::operator=(const valarray<_Tp>& __v) const
      { __valarray_copy (_Array<_Tp> (__v), _M_array, _M_sz, _M_stride); }
      
!   template<typename _Tp>
!   template<class _Dom>
      inline void
!     slice_array<_Tp>::operator=(const _Expr<_Dom,_Tp>& __e) const
      { __valarray_copy (__e, _M_sz, _M_array, _M_stride); }
  
  #undef _DEFINE_VALARRAY_OPERATOR
! #define _DEFINE_VALARRAY_OPERATOR(_Op,_Nname)				\
  template<typename _Tp>							\
  inline void								\
! slice_array<_Tp>::operator _Op##= (const valarray<_Tp>& __v) const	\
  {									\
!   _Array_augmented_##_Name (_M_array, _M_sz, _M_stride, _Array<_Tp> (__v));\
  }									\
  									\
  template<typename _Tp> template<class _Dom>				\
  inline void								\
! slice_array<_Tp>::operator _Op##= (const _Expr<_Dom,_Tp>& __e) const	\
  {									\
!     _Array_augmented_##_Name (_M_array, _M_stride, __e, _M_sz);		\
  }
          
  
Index: include/std/std_valarray.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/std/std_valarray.h,v
retrieving revision 1.2
diff -p -r1.2 std_valarray.h
*** include/std/std_valarray.h	28 Jan 2002 22:13:11 -0000	1.2
--- include/std/std_valarray.h	16 Jul 2002 00:18:17 -0000
*************** namespace std
*** 254,260 ****
  
  } // std::
        
- #include <bits/slice.h>
  #include <bits/slice_array.h>
  #include <bits/gslice.h>
  #include <bits/gslice_array.h>
--- 254,259 ----
Index: testsuite/26_numerics/slice.cc
===================================================================
RCS file: testsuite/26_numerics/slice.cc
diff -N testsuite/26_numerics/slice.cc
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- testsuite/26_numerics/slice.cc	16 Jul 2002 00:18:17 -0000
***************
*** 0 ****
--- 1,62 ----
+ // 20020717 gdr
+ 
+ // Copyright (C) 2002 Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library.  This library is free
+ // software; you can redistribute it and/or modify it under the
+ // terms of the GNU General Public License as published by the
+ // Free Software Foundation; either version 2, or (at your option)
+ // any later version.
+ 
+ // This library is distributed in the hope that it will be useful,
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ // GNU General Public License for more details.
+ 
+ // You should have received a copy of the GNU General Public License along
+ // with this library; see the file COPYING.  If not, write to the Free
+ // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ // USA.
+ 
+ // Test slice class invariants
+ 
+ #include <valarray>
+ #include <cstdlib>
+ #include <testsuite_hooks.h>
+ 
+ bool
+ construction(int start, int size, int stride)
+ {
+   std::slice s(start, size, stride);
+   return s.start() == start && s.size() == size && s.stride() == stride;
+ }
+ 
+ bool
+ copy(int start, int size, int stride)
+ {
+   std::slice s(start, size, stride);
+   std::slice t = s;
+   return t.start() == start && t.size() == size && t.stride() == stride;
+ }
+ 
+ bool
+ assignment(int start, int size, int stride)
+ {
+   std::slice s(start, size, stride);
+   std::slice t;
+   t = s;
+   return t.start() == start && t.size() == size && t.stride() == stride;
+ }
+ 
+ 
+ int main()
+ {
+   std::srand(20020717);         using std::rand;
+   VERIFY(construction(rand(), rand(), rand()));
+ 
+   VERIFY(copy(rand(), rand(), rand()));
+ 
+   VERIFY(assignment(rand(), rand(), rand()));
+ 
+   return 0;
+ }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]