diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-05 23:59:02 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-05 23:59:02 +0000 |
commit | f5d5e57a6207e3bb719427181e828d02ff1c1ca8 (patch) | |
tree | 462b278e0f92f8b59b288b846426590ebd475381 /libstdc++-v3 | |
parent | 368e686f3cbcd677bcc79355fa1d10ed9d7c09c9 (diff) | |
download | gcc-f5d5e57a6207e3bb719427181e828d02ff1c1ca8.tar.gz |
2000-07-05 brent verner <brent@rcfile.org>
* testsuite/27_io/ifstream_members.cc (test01): Add tests.
* testsuite/27_io/ofstream_members.cc (test01): Add tests.
* config/c_io_libio.cc (__basic_file::open): Unset
~_IO_DELETE_DONT_CLOSE.
2000-07-05 Zack Weinberg <zack@wolery.cumb.org>
* bits/gslice_array.h, bits/indirect_array.h, bits/mask_array.h,
bits/slice_array.h, bits/std_valarray.h, bits/valarray_meta.h:
Do not paste anything after 'operator' keyword.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34877 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 13 | ||||
-rw-r--r-- | libstdc++-v3/bits/gslice_array.h | 6 | ||||
-rw-r--r-- | libstdc++-v3/bits/indirect_array.h | 6 | ||||
-rw-r--r-- | libstdc++-v3/bits/mask_array.h | 6 | ||||
-rw-r--r-- | libstdc++-v3/bits/slice_array.h | 6 | ||||
-rw-r--r-- | libstdc++-v3/bits/std_valarray.h | 22 | ||||
-rw-r--r-- | libstdc++-v3/bits/valarray_meta.h | 24 | ||||
-rw-r--r-- | libstdc++-v3/config/c_io_libio.cc | 1 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/27_io/ifstream_members.cc | 21 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/27_io/ofstream_members.cc | 21 |
10 files changed, 91 insertions, 35 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 40658e89d04..665250aca00 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,16 @@ +2000-07-05 brent verner <brent@rcfile.org> + + * testsuite/27_io/ifstream_members.cc (test01): Add tests. + * testsuite/27_io/ofstream_members.cc (test01): Add tests. + * config/c_io_libio.cc (__basic_file::open): Unset + ~_IO_DELETE_DONT_CLOSE. + +2000-07-05 Zack Weinberg <zack@wolery.cumb.org> + + * bits/gslice_array.h, bits/indirect_array.h, bits/mask_array.h, + bits/slice_array.h, bits/std_valarray.h, bits/valarray_meta.h: + Do not paste anything after 'operator' keyword. + 2000-07-03 Benjamin Kosnik <bkoz@purist.soma.redhat.com> * bits/std_memory.h: Revert. diff --git a/libstdc++-v3/bits/gslice_array.h b/libstdc++-v3/bits/gslice_array.h index cad3485631a..23a1f6d438b 100644 --- a/libstdc++-v3/bits/gslice_array.h +++ b/libstdc++-v3/bits/gslice_array.h @@ -1,6 +1,6 @@ // The template and inlines for the -*- C++ -*- gslice_array class. -// Copyright (C) 1997-1999 Free Software Foundation, Inc. +// Copyright (C) 1997-1999, 2000 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 @@ -133,7 +133,7 @@ namespace std { #define _DEFINE_VALARRAY_OPERATOR(op, name) \ template<typename _Tp> \ inline void \ -gslice_array<_Tp>::operator##op##= (const valarray<_Tp>& __v) const \ +gslice_array<_Tp>::operator op##= (const valarray<_Tp>& __v) const \ { \ _Array_augmented_##name (_M_array, _Array<size_t>(_M_index), \ _Array<_Tp> (__v), __v.size ()); \ @@ -141,7 +141,7 @@ gslice_array<_Tp>::operator##op##= (const valarray<_Tp>& __v) const \ \ template<typename _Tp> template<class E> \ inline void \ -gslice_array<_Tp>::operator##op##= (const _Expr<E, _Tp>& __e) const \ +gslice_array<_Tp>::operator op##= (const _Expr<E, _Tp>& __e) const \ { \ _Array_augmented_##name (_M_array, _Array<size_t>(_M_index), __e, \ _M_index.size()); \ diff --git a/libstdc++-v3/bits/indirect_array.h b/libstdc++-v3/bits/indirect_array.h index 73d382a61c1..1ad3b911f6b 100644 --- a/libstdc++-v3/bits/indirect_array.h +++ b/libstdc++-v3/bits/indirect_array.h @@ -1,6 +1,6 @@ // The template and inlines for the -*- C++ -*- indirect_array class. -// Copyright (C) 1997-1999 Free Software Foundation, Inc. +// Copyright (C) 1997-1999, 2000 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 @@ -126,14 +126,14 @@ namespace std { #define _DEFINE_VALARRAY_OPERATOR(op, name) \ template<typename _Tp> \ inline void \ -indirect_array<_Tp>::operator##op##= (const valarray<_Tp>& __v) const \ +indirect_array<_Tp>::operator op##= (const valarray<_Tp>& __v) const \ { \ _Array_augmented_##name (_M_array, _M_index, _Array<_Tp> (__v), _M_sz); \ } \ \ template<typename _Tp> template<class _Dom> \ inline void \ -indirect_array<_Tp>::operator##op##= (const _Expr<_Dom,_Tp>& __e) const \ +indirect_array<_Tp>::operator op##= (const _Expr<_Dom,_Tp>& __e) const \ { \ _Array_augmented_##name (_M_array, _M_index, __e, _M_sz); \ } diff --git a/libstdc++-v3/bits/mask_array.h b/libstdc++-v3/bits/mask_array.h index 5654a2fc09c..5a15f7a5e97 100644 --- a/libstdc++-v3/bits/mask_array.h +++ b/libstdc++-v3/bits/mask_array.h @@ -1,6 +1,6 @@ // The template and inlines for the -*- C++ -*- mask_array class. -// Copyright (C) 1997-1999 Free Software Foundation, Inc. +// Copyright (C) 1997-1999, 2000 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 @@ -125,7 +125,7 @@ namespace std { #define _DEFINE_VALARRAY_OPERATOR(op, name) \ template<typename _Tp> \ inline void \ -mask_array<_Tp>::operator##op##= (const valarray<_Tp>& __v) const \ +mask_array<_Tp>::operator op##= (const valarray<_Tp>& __v) const \ { \ _Array_augmented_##name (_M_array, _M_mask, \ _Array<_Tp> (__v), __v.size ()); \ @@ -133,7 +133,7 @@ mask_array<_Tp>::operator##op##= (const valarray<_Tp>& __v) const \ \ template<typename _Tp> template<class E> \ inline void \ -mask_array<_Tp>::operator##op##= (const _Expr<E, _Tp>& __e) const \ +mask_array<_Tp>::operator op##= (const _Expr<E, _Tp>& __e) const \ { \ _Array_augmented_##name (_M_array, _M_mask, __e, __e.size ()); \ } diff --git a/libstdc++-v3/bits/slice_array.h b/libstdc++-v3/bits/slice_array.h index 04efd5ff9d9..4681cb590dc 100644 --- a/libstdc++-v3/bits/slice_array.h +++ b/libstdc++-v3/bits/slice_array.h @@ -1,6 +1,6 @@ // The template and inlines for the -*- C++ -*- slice_array class. -// Copyright (C) 1997-1999 Free Software Foundation, Inc. +// Copyright (C) 1997-1999, 2000 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 @@ -126,14 +126,14 @@ namespace std { #define _DEFINE_VALARRAY_OPERATOR(op, name) \ template<typename _Tp> \ inline void \ -slice_array<_Tp>::operator##op##= (const valarray<_Tp>& __v) const \ +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 \ +slice_array<_Tp>::operator op##= (const _Expr<_Dom,_Tp>& __e) const \ { \ _Array_augmented_##name (_M_array, _M_stride, __e, _M_sz); \ } diff --git a/libstdc++-v3/bits/std_valarray.h b/libstdc++-v3/bits/std_valarray.h index 3a5f0c7ba1a..63daf9fd6bd 100644 --- a/libstdc++-v3/bits/std_valarray.h +++ b/libstdc++-v3/bits/std_valarray.h @@ -1,6 +1,6 @@ // The template and inlines for the -*- C++ -*- valarray class. -// Copyright (C) 1997-1999 Free Software Foundation, Inc. +// Copyright (C) 1997-1999, 2000 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 @@ -585,7 +585,7 @@ namespace std { #define _DEFINE_VALARRAY_UNARY_OPERATOR(_Op, _Name) \ template<typename _Tp> \ inline _Expr<_UnClos<_Name,_ValArray,_Tp>, _Tp> \ - valarray<_Tp>::operator##_Op() const \ + valarray<_Tp>::operator _Op() const \ { \ typedef _UnClos<_Name,_ValArray,_Tp> _Closure; \ return _Expr<_Closure, _Tp> (_Closure (*this)); \ @@ -608,7 +608,7 @@ namespace std { #define _DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(_Op, _Name) \ template<class _Tp> \ inline valarray<_Tp> & \ - valarray<_Tp>::operator##_Op##= (const _Tp &__t) \ + valarray<_Tp>::operator _Op##= (const _Tp &__t) \ { \ _Array_augmented_##_Name (_Array<_Tp>(_M_data), _M_size, __t); \ return *this; \ @@ -616,7 +616,7 @@ namespace std { \ template<class _Tp> \ inline valarray<_Tp> & \ - valarray<_Tp>::operator##_Op##= (const valarray<_Tp> &__v) \ + valarray<_Tp>::operator _Op##= (const valarray<_Tp> &__v) \ { \ _Array_augmented_##_Name (_Array<_Tp>(_M_data), _M_size, \ _Array<_Tp>(__v._M_data)); \ @@ -645,7 +645,7 @@ namespace std { #define _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(_Op, _Name) \ template<class _Tp> template<class _Dom> \ inline valarray<_Tp> & \ - valarray<_Tp>::operator##_Op##= (const _Expr<_Dom,_Tp> &__e) \ + valarray<_Tp>::operator _Op##= (const _Expr<_Dom,_Tp> &__e) \ { \ _Array_augmented_##_Name (_Array<_Tp>(_M_data), __e, _M_size); \ return *this; \ @@ -668,7 +668,7 @@ _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(>>, shift_right) #define _DEFINE_BINARY_OPERATOR(_Op, _Name) \ template<typename _Tp> \ inline _Expr<_BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp>, _Tp> \ - operator##_Op (const valarray<_Tp> &__v, const valarray<_Tp> &__w) \ + operator _Op (const valarray<_Tp> &__v, const valarray<_Tp> &__w) \ { \ typedef _BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp> _Closure; \ return _Expr<_Closure, _Tp> (_Closure (__v, __w)); \ @@ -676,7 +676,7 @@ _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(>>, shift_right) \ template<typename _Tp> \ inline _Expr<_BinClos<_Name,_ValArray,_Constant,_Tp,_Tp>,_Tp> \ - operator##_Op (const valarray<_Tp> &__v, const _Tp &__t) \ + operator _Op (const valarray<_Tp> &__v, const _Tp &__t) \ { \ typedef _BinClos<_Name,_ValArray,_Constant,_Tp,_Tp> _Closure; \ return _Expr<_Closure, _Tp> (_Closure (__v, __t)); \ @@ -684,7 +684,7 @@ _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(>>, shift_right) \ template<typename _Tp> \ inline _Expr<_BinClos<_Name,_Constant,_ValArray,_Tp,_Tp>,_Tp> \ - operator##_Op (const _Tp &__t, const valarray<_Tp> &__v) \ + operator _Op (const _Tp &__t, const valarray<_Tp> &__v) \ { \ typedef _BinClos<_Name,_Constant,_ValArray,_Tp,_Tp> _Closure; \ return _Expr<_Closure, _Tp> (_Closure (__t, __v)); \ @@ -706,7 +706,7 @@ _DEFINE_BINARY_OPERATOR(>>, _Shift_right) #define _DEFINE_LOGICAL_OPERATOR(_Op, _Name) \ template<typename _Tp> \ inline _Expr<_BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp>,bool> \ - operator##_Op (const valarray<_Tp> &__v, const valarray<_Tp> &__w) \ + operator _Op (const valarray<_Tp> &__v, const valarray<_Tp> &__w) \ { \ typedef _BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp> _Closure; \ return _Expr<_Closure, bool> (_Closure (__v, __w)); \ @@ -714,7 +714,7 @@ _DEFINE_BINARY_OPERATOR(>>, _Shift_right) \ template<class _Tp> \ inline _Expr<_BinClos<_Name,_ValArray,_Constant,_Tp,_Tp>,bool> \ - operator##_Op (const valarray<_Tp> &__v, const _Tp &__t) \ + operator _Op (const valarray<_Tp> &__v, const _Tp &__t) \ { \ typedef _BinClos<_Name,_ValArray,_Constant,_Tp,_Tp> _Closure; \ return _Expr<_Closure, bool> (_Closure (__v, __t)); \ @@ -722,7 +722,7 @@ _DEFINE_BINARY_OPERATOR(>>, _Shift_right) \ template<class _Tp> \ inline _Expr<_BinClos<_Name,_Constant,_ValArray,_Tp,_Tp>,bool> \ - operator##_Op (const _Tp &__t, const valarray<_Tp> &__v) \ + operator _Op (const _Tp &__t, const valarray<_Tp> &__v) \ { \ typedef _BinClos<_Name,_Constant,_ValArray,_Tp,_Tp> _Closure; \ return _Expr<_Closure, bool> (_Closure (__t, __v)); \ diff --git a/libstdc++-v3/bits/valarray_meta.h b/libstdc++-v3/bits/valarray_meta.h index 1207bd96e2d..c203d421e05 100644 --- a/libstdc++-v3/bits/valarray_meta.h +++ b/libstdc++-v3/bits/valarray_meta.h @@ -1,6 +1,6 @@ // The template and inlines for the -*- C++ -*- internal _Meta class. -// Copyright (C) 1997-1999 Free Software Foundation, Inc. +// Copyright (C) 1997-1999, 2000 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 @@ -763,7 +763,7 @@ namespace std { #define _DEFINE_EXPR_UNARY_OPERATOR(_Op, _Name) \ template<class _Dom, typename _Tp> \ inline _Expr<_UnClos<_Name,_Expr,_Dom>,_Tp> \ -_Expr<_Dom,_Tp>::operator##_Op () const \ +_Expr<_Dom,_Tp>::operator _Op () const \ { \ typedef _UnClos<_Name,_Expr,_Dom> _Closure; \ return _Expr<_Closure,_Tp> (_Closure (this->_M_closure)); \ @@ -780,7 +780,7 @@ _Expr<_Dom,_Tp>::operator##_Op () const \ template<class _Dom1, class _Dom2> \ inline _Expr<_BinClos<_Name,_Expr,_Expr,_Dom1,_Dom2>, \ typename _Name<typename _Dom1::value_type>::result_type> \ -operator##_Op (const _Expr<_Dom1,typename _Dom1::value_type>& __v, \ +operator _Op (const _Expr<_Dom1,typename _Dom1::value_type>& __v, \ const _Expr<_Dom2,typename _Dom2::value_type>& __w) \ { \ typedef typename _Dom1::value_type _Arg; \ @@ -792,7 +792,7 @@ operator##_Op (const _Expr<_Dom1,typename _Dom1::value_type>& __v, \ template<class _Dom> \ inline _Expr<_BinClos<_Name,_Expr,_Constant,_Dom,typename _Dom::value_type>, \ typename _Name<typename _Dom::value_type>::result_type> \ -operator##_Op (const _Expr<_Dom,typename _Dom::value_type>& __v, \ +operator _Op (const _Expr<_Dom,typename _Dom::value_type>& __v, \ const typename _Dom::value_type& __t) \ { \ typedef typename _Dom::value_type _Arg; \ @@ -804,7 +804,7 @@ operator##_Op (const _Expr<_Dom,typename _Dom::value_type>& __v, \ template<class _Dom> \ inline _Expr<_BinClos<_Name,_Constant,_Expr,typename _Dom::value_type,_Dom>, \ typename _Name<typename _Dom::value_type>::result_type> \ -operator##_Op (const typename _Dom::value_type& __t, \ +operator _Op (const typename _Dom::value_type& __t, \ const _Expr<_Dom,typename _Dom::value_type>& __v) \ { \ typedef typename _Dom::value_type _Arg; \ @@ -816,7 +816,7 @@ operator##_Op (const typename _Dom::value_type& __t, \ template<class _Dom> \ inline _Expr<_BinClos<_Name,_Expr,_ValArray,_Dom,typename _Dom::value_type>, \ typename _Name<typename _Dom::value_type>::result_type> \ -operator##_Op (const _Expr<_Dom,typename _Dom::value_type>& __e, \ +operator _Op (const _Expr<_Dom,typename _Dom::value_type>& __e, \ const valarray<typename _Dom::value_type>& __v) \ { \ typedef typename _Dom::value_type _Arg; \ @@ -828,7 +828,7 @@ operator##_Op (const _Expr<_Dom,typename _Dom::value_type>& __e, \ template<class _Dom> \ inline _Expr<_BinClos<_Name,_ValArray,_Expr,typename _Dom::value_type,_Dom>, \ typename _Name<typename _Dom::value_type>::result_type> \ -operator##_Op (const valarray<typename _Dom::value_type>& __v, \ +operator _Op (const valarray<typename _Dom::value_type>& __v, \ const _Expr<_Dom,typename _Dom::value_type>& __e) \ { \ typedef typename _Dom::value_type _Tp; \ @@ -853,7 +853,7 @@ operator##_Op (const valarray<typename _Dom::value_type>& __v, \ #define _DEFINE_EXPR_RELATIONAL_OPERATOR(_Op, _Name) \ template<class _Dom1, class _Dom2> \ inline _Expr<_BinClos<_Name,_Expr,_Expr,_Dom1,_Dom2>, bool> \ -operator##_Op (const _Expr<_Dom1,typename _Dom1::value_type>& __v, \ +operator _Op (const _Expr<_Dom1,typename _Dom1::value_type>& __v, \ const _Expr<_Dom2,typename _Dom2::value_type>& __w) \ { \ typedef typename _Dom1::value_type _Arg; \ @@ -864,7 +864,7 @@ operator##_Op (const _Expr<_Dom1,typename _Dom1::value_type>& __v, \ template<class _Dom> \ inline _Expr<_BinClos<_Name,_Expr,_Constant,_Dom,typename _Dom::value_type>, \ bool> \ -operator##_Op (const _Expr<_Dom,typename _Dom::value_type>& __v, \ +operator _Op (const _Expr<_Dom,typename _Dom::value_type>& __v, \ const typename _Dom::value_type& __t) \ { \ typedef typename _Dom::value_type _Arg; \ @@ -875,7 +875,7 @@ operator##_Op (const _Expr<_Dom,typename _Dom::value_type>& __v, \ template<class _Dom> \ inline _Expr<_BinClos<_Name,_Constant,_Expr,typename _Dom::value_type,_Dom>, \ bool> \ -operator##_Op (const typename _Dom::value_type& __t, \ +operator _Op (const typename _Dom::value_type& __t, \ const _Expr<_Dom,typename _Dom::value_type>& __v) \ { \ typedef typename _Dom::value_type _Arg; \ @@ -886,7 +886,7 @@ operator##_Op (const typename _Dom::value_type& __t, \ template<class _Dom> \ inline _Expr<_BinClos<_Name,_Expr,_ValArray,_Dom,typename _Dom::value_type>, \ bool> \ -operator##_Op (const _Expr<_Dom,typename _Dom::value_type>& __e, \ +operator _Op (const _Expr<_Dom,typename _Dom::value_type>& __e, \ const valarray<typename _Dom::value_type>& __v) \ { \ typedef typename _Dom::value_type _Tp; \ @@ -897,7 +897,7 @@ operator##_Op (const _Expr<_Dom,typename _Dom::value_type>& __e, \ template<class _Dom> \ inline _Expr<_BinClos<_Name,_ValArray,_Expr,typename _Dom::value_type,_Dom>, \ bool> \ -operator##_Op (const valarray<typename _Dom::value_type>& __v, \ +operator _Op (const valarray<typename _Dom::value_type>& __v, \ const _Expr<_Dom,typename _Dom::value_type>& __e) \ { \ typedef typename _Dom::value_type _Tp; \ diff --git a/libstdc++-v3/config/c_io_libio.cc b/libstdc++-v3/config/c_io_libio.cc index 69a820009ce..ebb696ed1df 100644 --- a/libstdc++-v3/config/c_io_libio.cc +++ b/libstdc++-v3/config/c_io_libio.cc @@ -152,6 +152,7 @@ namespace std { #if _G_HAVE_IO_FILE_OPEN __c_file_type* __f; __f = _IO_file_open(this, __name, __p_mode, __prot, __rw_mode, 0); + _flags &= ~_IO_DELETE_DONT_CLOSE; __retval = __f ? this: NULL; #else int __fd = ::open(__name, __p_mode, __prot); diff --git a/libstdc++-v3/testsuite/27_io/ifstream_members.cc b/libstdc++-v3/testsuite/27_io/ifstream_members.cc index 9b4107a6605..79e683a9e5c 100644 --- a/libstdc++-v3/testsuite/27_io/ifstream_members.cc +++ b/libstdc++-v3/testsuite/27_io/ifstream_members.cc @@ -54,7 +54,28 @@ bool test00() return test; } +// http://sourceware.cygnus.com/ml/libstdc++/2000-07/msg00004.html +bool test01() +{ + bool test = true; + const int more_than_max_open_files = 8200; + + for(int i = 0; ++i < more_than_max_open_files;) + { + std::ifstream ifs(name_01); + test &= static_cast<bool>(ifs); + } + +#ifdef DEBUG_ASSERT + assert(test); +#endif + + return test; +} + + int main() { test00(); + test01(); } diff --git a/libstdc++-v3/testsuite/27_io/ofstream_members.cc b/libstdc++-v3/testsuite/27_io/ofstream_members.cc index 0b52519c078..76c5a1d5e7a 100644 --- a/libstdc++-v3/testsuite/27_io/ofstream_members.cc +++ b/libstdc++-v3/testsuite/27_io/ofstream_members.cc @@ -54,7 +54,28 @@ bool test00() return test; } + +// http://sourceware.cygnus.com/ml/libstdc++/2000-07/msg00004.html +bool test01() +{ + bool test = true; + const int more_than_max_open_files = 8200; + + for(int i = 0; ++i < more_than_max_open_files;) + { + std::ofstream ifs(name_02); + test &= static_cast<bool>(ifs); + } + +#ifdef DEBUG_ASSERT + assert(test); +#endif + + return test; +} + int main() { test00(); + test01(); } |