From: "Alex Vinokur" Newsgroups: comp.os.msdos.djgpp,comp.lang.c++ Subject: Warning : value_type is implicitly a typename (gcc/gpp-3.1) Date: Sun, 11 Aug 2002 08:56:50 +0200 Organization: Scopus Lines: 153 Message-ID: References: NNTP-Posting-Host: gateway.scopus.net (62.90.123.5) X-Trace: fu-berlin.de 1029045364 41646343 62.90.123.5 (16 [79865]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "John Harrison" wrote in message news:Nz759.1526$id3 DOT 59789 AT newsfep2-win DOT server DOT ntli DOT net... > > "Alex Vinokur" wrote in message > news:aj2vjj$178ktl$1 AT ID-79865 DOT news DOT dfncis DOT de... > > ============ > > Windows 2000 > > DJGPP 2.03 > > gcc/gpp 3.1 > > ============ > > > > > > The code below has no problem with gcc/gpp 3.0.4. > > > > However it does have a problem with gcc/gpp 3.1. > > > > What has been changed concerning istream_iterator and ostream_iterator ? > > > > ######### C++ code : BEGIN ######### > > // File t1.cpp > > > > #include > > #include > > #include > > #include > > #include > > using namespace std; > > > > You should include the header file for istream_iterator and > ostream_iterator. > > john > > > Thanks to John. I have a new problem while going over (from gcc-3.0.4) to gcc-3.1. ============ Windows 2000 DJGPP 2.03 gcc/gpp 3.1 ============ A code below has no problem with gcc/gpp 3.0.4. However it does have a problem with gcc/gpp 3.1. It seems that using template with typedef below causes warnings. ######### C++ code : BEGIN ######### // File ttt5.cpp #include #include using namespace std; // ============================= // -------------- class AAA {}; bool operator< (const AAA& ins1, const AAA& ins2) { return true; } // -------------- template class BBB {}; //============================= // -------------- template void foo1 () { // ---------------------------------------- typedef map >, less > map1_typename; // No problem with gcc-3.1 typedef map1_typename::value_type map1_value_type; pair pair1_insert; map1_typename::iterator map1_pos; // ---------------------------------------- typedef map >, less > map2_typename; // There is a problem with gcc-3.1 typedef map2_typename::value_type map2_value_type; pair pair2_insert; map2_typename::iterator map2_pos; // ---------------------------------------- } // foo1 // -------------- int main () { return 0; } ######### C++ code : END ########### ######### Compilation : BEGIN ######### %gpp ttt5.cpp TTT5.CPP: In function `void foo1()': TTT5.CPP:31: warning: `typename std::map, std::allocator > >, std::less, std::allocator, std::allocator > > > > >::value_type' is implicitly a typename TTT5.CPP:31: warning: implicit typename is deprecated, please see the documentation for details TTT5.CPP:32: warning: `typename std::map, std::allocator > >, std::less, std::allocator, std::allocator > > > > >::iterator' is implicitly a typename TTT5.CPP:32: warning: implicit typename is deprecated, please see the documentation for details TTT5.CPP:33: warning: `typename std::map, std::allocator > >, std::less, std::allocator, std::allocator > > > > >::iterator' is implicitly a typename TTT5.CPP:33: warning: implicit typename is deprecated, please see the documentation for details ######### Compilation : END ########### ==================== Alex Vinokur http://up.to/alexvn http://go.to/alexv_math mailto:alexvn AT bigfoot DOT com mailto:alexvn AT go DOT to ====================