Description of Problem: When I try to compile following code: // ... skipped typedef STD basic_iostream<Char,It> Iostr; Iostr::traits_type * some = (It*)0; // ... skipped Compiler tells me that member `traits_type' is ambiguous and candidates are placed in basic_ostream and basic_istream. I know that C++ standard 27.6.1.1 & 27.6.2.1 describes public types of classes basic_istream & basic_ostream such as: ....... public: // Types (inherited from basic_ios (27.4.4)): 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; ..... but I believe that these typedefs can be placed in basic_ios only. Version-Release number of selected component (if applicable): How Reproducible: Try to compile source code which contains refference to iostream::traits_type Steps to Reproduce: 1. Try to compile source code which contains refference to iostream::traits_type 2. 3. Actual Results: request for member `traits_type' is ambiguous /usr/include/g++-v3/bits/std_ostream.h:54: candidates are: typedef struct std::char_traits<char> std::basic_ostream<char, std::char_traits<char> >::traits_type /usr/include/g++-v3/bits/std_istream.h:54: typedef struct std::char_traits<char> std::basic_istream<char, std::char_traits<char> >::traits_type Expected Results: Code should be compiled without any errors. Additional Information:
Dunno what's up with this bug, report itself is ambiguous. Please reopen and provide source to your problem if you feel this is still an active issue. This works with gcc-3.3.x and gcc-3.4.x: #include <iostream> int main() { typedef std::basic_iostream<char, std::char_traits<char> > Iostr; Iostr::traits_type* some = NULL; }