This is the mail archive of the libstdc++@sourceware.cygnus.com mailing 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]

Re: stl_algo.h name conflict with gcc internal


Benjamin Kosnik wrote:
> 
> Do you have any example code that demonstrates this?

Yes, below.  (I don't put code before headers on purpose, it
just happens when there is a lot of include files including
each other...)
 -petter.


[---]$ cat opr.cc
struct C {
    operator long double() {}
};
#include <algorithm>

[---]$ c++3 opr.cc
In file included from
/usr/local/lib3/include/g++-v3/bits/std_algorithm.h:34,
                 from /usr/local/lib3/include/g++-v3/algorithm:2,
                 from opr.cc:4:
/usr/local/lib3/include/g++-v3/bits/stl_algo.h:452: declaration of
`operator long double' as non-function
/usr/local/lib3/include/g++-v3/bits/stl_algo.h:452: confused by earlier
errors, bailing out

[---]$ c++3 -v
Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.96/specs
gcc version 2.96 19991018 (experimental)
c++: No input files

[---]$ alias c++3
alias c++3='c++ -I/usr/local/lib3/include/g++-v3 -L/usr/local/lib3/lib'



-- 
[http://matfys.lth.se/~petter/]

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]