public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/7731: erroneous implicit typename is deprecated
@ 2002-08-26 21:28 pauljlucas
0 siblings, 0 replies; only message in thread
From: pauljlucas @ 2002-08-26 21:28 UTC (permalink / raw)
To: gcc-gnats; +Cc: pauljlucas
>Number: 7731
>Category: c++
>Synopsis: g++ issues erroneous warning: implicit typename is deprecated
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Mon Aug 26 21:16:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Paul J. Lucas
>Release: 3.2
>Organization:
>Environment:
System: Linux powerbook 2.4.18-rc4-benh #1 Mon Feb 25 23:23:12 PST 2002 ppc unknown
Architecture: ppc
host: powerpc-unknown-linux-gnu
build: powerpc-unknown-linux-gnu
target: powerpc-unknown-linux-gnu
configured with: /tmp/gcc-3.2/configure --prefix=/usr/local/packages/gcc-3.2 --enable-threads=posix --enable-languages=c,c++ --disable-nls
>Description:
Compiler issues aforementioned warning regarding result_type and argument_type.
The complete warning is:
----- CUT -----
bug.c:8: warning: `typename pattern_map<T>::pattern_match::result_type' is implicitly a typename
bug.c:8: warning: implicit typename is deprecated, please see the documentation for details
bug.c:8: warning: `typename pattern_map<T>::pattern_match::argument_type' is implicitly a typename
bug.c:8: warning: implicit typename is deprecated, please see the documentation for details
----- CUT -----
Note that this warning is not issued if the class pattern_map is at file scope
and not within a template.
>How-To-Repeat:
Compile this code:
//----- CUT -----
#include <map>
template< class T > struct pattern_map : std::map< int, T > {
typedef typename std::map< int, T > map_type;
typedef typename map_type::value_type value_type;
struct pattern_match : std::unary_function< value_type const&, bool > {
result_type operator()( argument_type a ) const {
return true;
}
};
};
struct pattern_match : std::unary_function< int, bool > {
result_type operator()( argument_type a ) const {
return true;
}
};
main() {
pattern_map<int> p;
}
//----- CUT -----
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-08-27 4:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-26 21:28 c++/7731: erroneous implicit typename is deprecated pauljlucas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).