Gabriel Dos Reis - Re: gcc 3.2 compilation problem] (original) (raw)
This is the mail archive of the libstdc++@gcc.gnu.orgmailing list for the libstdc++ project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
- From: Gabriel Dos Reis
- To: Paul Marculescu
- Cc: libstdc++ at gcc dot gnu dot org
- Date: 18 Nov 2002 18:35:58 +0100
- Subject: Re: gcc 3.2 compilation problem]
- Organization: Integrable Solutions
- References: <3DD92385.6010500@gecadsoftware.com>
Paul Marculescu mpaul@gecadsoftware.com writes:
| Hello. | | I just upgraded to gcc3.2 and I'm trying to compile this code: | | ------------------- cut here --------------------- | | #include | #include | #include | #include <iostream | | using namespace std; | | std::string& lower( std::string& p_str ) | { | std::transform( p_str.begin(), p_str.end(), p_str.begin(), tolower ); ^^^^^^^
This ought to be a FAQ.
Three facts:
- std::tolower (resp. std::toupper) is an overloaded function.
- C++ has no type for the set of overloaded functions.
- Template-argument deduction works by unifying the argument type with function parameter types.
by point 2), point 3) cannot succeed, hence the error.
-- Gaby
- Follow-Ups:
- Re: gcc 3.2 compilation problem]
* From: Benjamin Kosnik
- Re: gcc 3.2 compilation problem]
- References:
- gcc 3.2 compilation problem]
* From: Paul Marculescu
- gcc 3.2 compilation problem]
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |