2002-01-16 Benjamin Kosnik <bkoz@redhat.com>
+ Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
+
+ * include/bits/stl_iterator.h (reverse_iterator::_M_current):
+ Deuglify, should be current.
+ (back_insert_iterator::_M_container): Deuglify, should be container.
+ (front_insert_iterator::_M_container): Same.
+ (insert_iterator::_M_container): Same.
+ * testsuite/24_iterators/reverse_iterator.cc: Add check.
+ * testsuite/24_iterators/back_insert_iterator.cc: Add check.
+ * testsuite/24_iterators/front_insert_iterator.cc: Same.
+ * testsuite/24_iterators/insert_iterator.cc: Same.
+
+2002-01-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/bits/locale_facets.h (ctype<char>::classic_table): Make
+ static.
+ (ctype<char>::_M_ctable): Make static, change name to _S_ctable.
+ * config/os/gnu-linux/bits/ctype_noninline.h: Define _S_ctable.
+ * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Same.
+ * config/os/solaris/solaris2.6/bits/ctype_noninline.h: Same.
+ * config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same.
+ * config/os/newlib/bits/ctype_noninline.h: Same.
+ * config/os/irix/irix6.5/bits/ctype_noninline.h: Same.
+ * config/os/irix/irix5.2/bits/ctype_noninline.h: Same.
+ * config/os/hpux/bits/ctype_noninline.h: Same.
+ * config/os/djgpp/bits/ctype_noninline.h: Same.
+ * config/os/bsd/netbsd/bits/ctype_noninline.h: Same.
+ * config/os/bsd/freebsd/bits/ctype_noninline.h: Same.
+ * config/os/aix/bits/ctype_noninline.h: Same.
+
+ Testcase by Dietmar Kühl via Peter Schmid
+ * testsuite/22_locale/ctype_members_char.cc (char>): Add test for
+ classic_table().
+
+2002-01-16 Benjamin Kosnik <bkoz@redhat.com>
* libmath/signbitl.c: Copyright years as list, not range.
* libmath/Makefile.am: Same.
// Locale support -*- C++ -*-
-// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 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
//
// Information as gleaned from /usr/include/ctype.h
+
+ // Data for classic_table().
+ const ctype_base::mask* ctype<char>::_S_ctable;
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL),
- _M_ctable(NULL), _M_table(__table == 0 ? _M_ctable: __table)
+ _M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _S_ctable)
{ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL),
- _M_ctable(NULL), _M_table(__table == 0 ? _M_ctable: __table)
+ _M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _S_ctable)
{ }
char
// Locale support -*- C++ -*-
-// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 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
// Information as gleaned from /usr/include/ctype.h
+ // Data for classic_table().
+ const ctype_base::mask* ctype<char>::_S_ctable;
+
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL),
- _M_ctable(NULL), _M_table(__table == 0 ? _M_ctable: __table)
+ _M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _S_ctable)
{ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL),
- _M_ctable(NULL), _M_table(__table == 0 ? _M_ctable: __table)
+ _M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _S_ctable)
{ }
char
// Locale support -*- C++ -*-
-// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 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
// Information as gleaned from /usr/include/ctype.h
+ // Data for classic_table().
+ const ctype_base::mask* ctype<char>::_S_ctable;
+
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL),
- _M_ctable(NULL), _M_table(__table == 0 ? (_ctype_ + 1) : __table)
+ _M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _ctype_ + 1)
{ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
- _M_ctable(NULL), _M_table(__table == 0 ? (_ctype_ + 1) : __table)
+ _M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _ctype_ + 1)
{ }
char
// Locale support -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 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
// Information as gleaned from DJGPP <ctype.h>
+ // Data for classic_table().
+ const ctype_base::mask* ctype<char>::_S_ctable;
+
ctype<char>::ctype(__c_locale, const mask* __table = 0, bool __del = false,
size_t __refs = 0)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
_M_toupper(__dj_ctype_toupper), _M_tolower(__dj_ctype_tolower),
- _M_ctable(NULL), _M_table(__table == 0 ? __dj_ctype_flags : __table)
+ _M_table(__table ? __table : __dj_ctype_flags)
{ }
ctype<char>::ctype(const mask* __table = 0, bool __del = false,
size_t __refs = 0)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
_M_toupper(__dj_ctype_toupper), _M_tolower(__dj_ctype_tolower),
- _M_ctable(NULL), _M_table(__table == 0 ? __dj_ctype_flags : __table)
+ _M_table(__table ? __table : __dj_ctype_flags)
{ }
char
// Locale support -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// 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
//
// Information as gleaned from /usr/include/ctype.h
+
+ // Data for classic_table().
+ const ctype_base::mask* ctype<char>::_S_ctable;
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_ctable(NULL),
- _M_table(__table == 0 ? _M_ctable : __table)
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table == 0 ? _S_ctable : __table)
{ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_ctable(NULL),
- _M_table(__table == 0 ? _M_ctable : __table)
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table == 0 ? _S_ctable : __table)
{ }
char
// Locale support -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+// 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
using _C_legacy::__ctype_b;
#endif
+ // Data for classic_table().
+ const ctype_base::mask* ctype<char>::_S_ctable = __ctype_b;
+
#if _GLIBCPP_C_LOCALE_GNU
ctype<char>::ctype(__c_locale __cloc, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_ctable(__ctype_b)
+ : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
{
_M_c_locale_ctype = _S_clone_c_locale(__cloc);
_M_toupper = _M_c_locale_ctype->__ctype_toupper;
size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
_M_toupper(__ctype_toupper), _M_tolower(__ctype_tolower),
- _M_ctable(__ctype_b), _M_table(__table ? __table : __ctype_b)
+ _M_table(__table ? __table : _S_ctable)
{ _M_c_locale_ctype = NULL; }
#endif
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) :
__ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
_M_toupper(__ctype_toupper), _M_tolower(__ctype_tolower),
- _M_ctable(__ctype_b), _M_table(__table == 0 ? _M_ctable : __table)
+ _M_table(__table ? __table : _S_ctable)
{ _M_c_locale_ctype = NULL; }
char
//
// Information as gleaned from /usr/include/ctype.h
+
+ // Data for classic_table().
+ const ctype_base::mask* ctype<char>::_S_ctable;
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_ctable(NULL),
- _M_table(__table == 0 ? (const mask *) __SB_masks : __table)
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : (const mask *) __SB_masks)
{ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_ctable(NULL),
- _M_table(__table == 0 ? (const mask *) __SB_masks : __table)
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : (const mask *) __SB_masks)
{ }
char
// Locale support -*- C++ -*-
-// Copyright (C) 1997-1999, 2001 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 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
// Information as gleaned from /usr/include/ctype.h
+ // Data for classic_table().
+ const ctype_base::mask* ctype<char>::_S_ctable;
+
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_ctable(NULL),
+ _M_toupper(NULL), _M_tolower(NULL),
_M_table(!__table ? __ctype : __table)
{ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_ctable(NULL),
+ _M_toupper(NULL), _M_tolower(NULL),
_M_table(!__table ? __ctype : __table)
{ }
// Locale support -*- C++ -*-
-// Copyright (C) 1997-1999, 2001 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 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
// Information as gleaned from /usr/include/ctype.h
+ // Data for classic_table().
+ const ctype_base::mask* ctype<char>::_S_ctable;
+
+ ctype<char>::ctype(const mask* __tab
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_ctable(NULL),
+ _M_toupper(NULL), _M_tolower(NULL),
_M_table(!__table ?
(const mask*) (__libc_attr._ctype_tbl->_class + 1) : __table)
{ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_ctable(NULL),
+ _M_toupper(NULL), _M_tolower(NULL),
_M_table(!__table ?
(const mask*) (__libc_attr._ctype_tbl->_class + 1) : __table)
{ }
// Locale support -*- C++ -*-
-// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 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
// Information as gleaned from /usr/include/ctype.h
+ // Data for classic_table().
+ const ctype_base::mask* ctype<char>::_S_ctable;
+
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_ctable(_ctype_),
- _M_table(__table == 0 ? _M_ctable : __table)
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : _S_ctable)
{ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_ctable(_ctype_),
- _M_table(__table == 0 ? _M_ctable : __table)
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : _S_ctable)
{ }
char
// Locale support -*- C++ -*-
-// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 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
//
// Information as gleaned from /usr/include/ctype.h
+
+ // Data for classic_table().
+ const ctype_base::mask* ctype<char>::_S_ctable;
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_ctable(__ctype),
- _M_table(__table == 0 ? _M_ctable: __table)
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : _S_ctable)
{ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_ctable(__ctype),
- _M_table(__table == 0 ? _M_ctable: __table)
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : _S_ctable)
{ }
char
// Locale support -*- C++ -*-
-// Copyright (C) 1997-2001 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 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
// Information as gleaned from /usr/include/ctype.h
+ // Data for classic_table().
+ const ctype_base::mask* ctype<char>::_S_ctable;
+
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
_M_toupper(__trans_upper), _M_tolower(__trans_lower),
- _M_ctable(__ctype_mask), _M_table(__table == 0 ? _M_ctable: __table)
+ _M_ctable(__ctype_mask), _M_table(__table ? __table : _M_ctable)
{ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
_M_toupper(__trans_upper), _M_tolower(__trans_lower),
- _M_ctable(__ctype_mask), _M_table(__table == 0 ? _M_ctable: __table)
+ _M_ctable(__ctype_mask), _M_table(__table ? __table : _M_ctable)
{ }
char
// Locale support -*- C++ -*-
-// Copyright (C) 1997-2001 Free Software Foundation, Inc.
+// 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
// Information as gleaned from /usr/include/ctype.h
+ // Data for classic_table().
+ const ctype_base::mask* ctype<char>::_S_ctable = __ctype_mask;
+
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
_M_toupper(__trans_upper), _M_tolower(__trans_lower),
- _M_ctable(__ctype_mask), _M_table(__table == 0 ? _M_ctable: __table)
+ _M_table(__table ? __table : _S_ctable)
{ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
_M_toupper(__trans_upper), _M_tolower(__trans_lower),
- _M_ctable(__ctype_mask), _M_table(__table == 0 ? _M_ctable: __table)
+ _M_table(__table == 0 ? __table : _S_ctable)
{ }
char
bool _M_del;
__to_type _M_toupper;
__to_type _M_tolower;
- const mask* _M_ctable;
const mask* _M_table;
public:
static locale::id id;
static const size_t table_size = 1 + static_cast<unsigned char>(-1);
+ static const mask* _S_ctable;
explicit
ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0);
table() const throw()
{ return _M_table; }
- const mask*
+ static const mask*
classic_table() throw()
- { return _M_ctable; }
+ { return _S_ctable; }
virtual
~ctype();
// Iterators -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 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
typename iterator_traits<_Iterator>::reference>
{
protected:
- _Iterator _M_current;
+ _Iterator current;
public:
typedef _Iterator iterator_type;
reverse_iterator() { }
explicit
- reverse_iterator(iterator_type __x) : _M_current(__x) { }
+ reverse_iterator(iterator_type __x) : current(__x) { }
reverse_iterator(const reverse_iterator& __x)
- : _M_current(__x._M_current) { }
+ : current(__x.current) { }
template<typename _Iter>
reverse_iterator(const reverse_iterator<_Iter>& __x)
- : _M_current(__x.base()) { }
+ : current(__x.base()) { }
iterator_type
- base() const { return _M_current; }
+ base() const { return current; }
reference
operator*() const
{
- _Iterator __tmp = _M_current;
+ _Iterator __tmp = current;
return *--__tmp;
}
reverse_iterator&
operator++()
{
- --_M_current;
+ --current;
return *this;
}
operator++(int)
{
reverse_iterator __tmp = *this;
- --_M_current;
+ --current;
return __tmp;
}
reverse_iterator&
operator--()
{
- ++_M_current;
+ ++current;
return *this;
}
reverse_iterator operator--(int)
{
reverse_iterator __tmp = *this;
- ++_M_current;
+ ++current;
return __tmp;
}
reverse_iterator
operator+(difference_type __n) const
- { return reverse_iterator(_M_current - __n); }
+ { return reverse_iterator(current - __n); }
reverse_iterator&
operator+=(difference_type __n)
{
- _M_current -= __n;
+ current -= __n;
return *this;
}
reverse_iterator
operator-(difference_type __n) const
- { return reverse_iterator(_M_current + __n); }
+ { return reverse_iterator(current + __n); }
reverse_iterator&
operator-=(difference_type __n)
{
- _M_current += __n;
+ current += __n;
return *this;
}
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
- _Container* _M_container;
+ _Container* container;
public:
typedef _Container container_type;
explicit
- back_insert_iterator(_Container& __x) : _M_container(&__x) { }
+ back_insert_iterator(_Container& __x) : container(&__x) { }
back_insert_iterator&
operator=(typename _Container::const_reference __value)
{
- _M_container->push_back(__value);
+ container->push_back(__value);
return *this;
}
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
- _Container* _M_container;
+ _Container* container;
public:
typedef _Container container_type;
- explicit front_insert_iterator(_Container& __x) : _M_container(&__x) { }
+ explicit front_insert_iterator(_Container& __x) : container(&__x) { }
front_insert_iterator&
operator=(typename _Container::const_reference __value)
{
- _M_container->push_front(__value);
+ container->push_front(__value);
return *this;
}
: public iterator<output_iterator_tag, void, void, void, void>
{
protected:
- _Container* _M_container;
+ _Container* container;
typename _Container::iterator iter;
public:
typedef _Container container_type;
insert_iterator(_Container& __x, typename _Container::iterator __i)
- : _M_container(&__x), iter(__i) {}
+ : container(&__x), iter(__i) {}
insert_iterator&
operator=(const typename _Container::const_reference __value)
{
- iter = _M_container->insert(iter, __value);
+ iter = container->insert(iter, __value);
++iter;
return *this;
}
VERIFY( v_c != v_de );
}
+// Dietmar Kühl via Peter Schmid
+class comma_ctype: public std::ctype<char>
+{
+public:
+ comma_ctype(): std::ctype<char>() { }
+ static void get_table()
+ { classic_table(); }
+};
+
int main()
{
test01();
test02();
+
return 0;
}
// 2001-06-21 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 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
iterator_type it = std::back_inserter(li);
}
+// Check data member 'container' accessible.
+class test_dm : public std::back_insert_iterator<std::list<int> >
+{
+ container_type l;
+ container_type* p;
+public:
+ test_dm(): std::back_insert_iterator<std::list<int> >(l), p(container) { }
+};
+
int main()
{
test01();
iterator_type it = std::front_inserter(li);
}
+// Check data member 'container' accessible.
+class test_dm : public std::front_insert_iterator<std::list<int> >
+{
+ container_type l;
+ container_type* p;
+public:
+ test_dm(): std::front_insert_iterator<std::list<int> >(l), p(container) { }
+};
+
int main()
{
test01();
iterator_type it02 = std::inserter(li, liit);
}
+// Check data member 'container' accessible.
+class test_dm : public std::insert_iterator<std::list<int> >
+{
+ container_type l;
+ container_type::iterator i;
+ container_type* p;
+public:
+ test_dm(): std::insert_iterator<std::list<int> >(l, i), p(container) { }
+};
+
int main()
{
test01();
// 2001-06-21 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 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
5 + it02;
}
+// Check data member 'current' accessible.
+class test_dm : public std::reverse_iterator<int*>
+{
+ int* p;
+public:
+ test_dm(): p(current) { }
+};
int main()
{
test02();
return 0;
}
-
-