stl_algo.h name conflict with gcc internal

Petter Urkedal
Thu Oct 21 02:12:00 GMT 1999

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...)

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

[---]$ c++3
In file included from
                 from /usr/local/lib3/include/g++-v3/algorithm:2,
/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'

[ ]

More information about the Gcc-bugs mailing list