basic_ifstream<>::char_type private?
llewelly@dbritsch.dsl.xmission.com
llewelly@dbritsch.dsl.xmission.com
Thu Apr 20 04:13:00 GMT 2000
In bits/std_fstream.h I see:
// 27.8.1.5 Template class basic_ifstream
template<typename _CharT, typename _Traits>
class basic_ifstream : public basic_istream<_CharT, _Traits>
{
// Types:
typedef _CharT char_type;
typedef typename _Traits::int_type int_type;
typedef typename _Traits::pos_type pos_type;
typedef typename _Traits::off_type off_type;
typedef _Traits traits_type;
//etc....
}
Which appears to declare char_type, etc private.
27.8.1.5 declares these types as public. Is this a bug?
However, gcc 2.95.2 does not complain if these types are used.
I seem to remember that gcc 2.95.2 has a bug relating to access control of
nested types; certainly it allows public access to all nested typedefs.
Note that basic_fstream<>, and basic_ofstream<> also declare these types
as private.
More information about the Libstdc++
mailing list