This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: C++0x name clash: invalid_argument
- From: Benjamin Kosnik <benjamin dot kosnik at gmail dot com>
- To: dgregor at osl dot iu dot edu
- Cc: doug dot gregor at gmail dot com, libstdc++ at gcc dot gnu dot org
- Date: Mon, 24 Sep 2007 11:11:07 -0500
- Subject: Re: C++0x name clash: invalid_argument
- References: <1190531867.3588.3.camel@localhost.localdomain>
> When we're in C++0x mode, there are now two different definitions of
> the name "invalid_argument" in namespace std. The first one is the
> exception class, which comes from <stdexcept>. The second is an
> enumerator that comes from <system_error> (for EINVAL). This causes
> compilation failures in the following program to fail under C++0x
> mode (and is killing my nightly regression testing of Boost):
>
> #include <stdexcept>
> #include <system_error>
>
> int main()
> {
> try {
> } catch(std::invalid_argument const&) {
> }
> }
Bummer. You should try to get Beeman to add this as a new issue to the
list of mess-ups in <system_error>.
-benjamin