Opened 15 years ago

Closed 14 years ago

#1796 closed Bugs (worksforme)

compile error when SDL_syswm.h (from sdl library) is included before foreach.hpp

Reported by: anonymous Owned by: Eric Niebler
Milestone: Boost 1.36.0 Component: foreach
Version: Boost 1.35.0 Severity: Cosmetic
Keywords: sdl foreach include Cc: disruption@…

Description

foreach won't compile when included after SDL_syswm.h

the following two lines

#include <SDL_syswm.h> #include <boost/foreach.hpp>

will result in:


Compiling: wakka/sdl/MusicManager.cpp /usr/include/boost/foreach.hpp:223: Fehler: expected nested-name-specifier before »int« /usr/include/boost/foreach.hpp:223: Fehler: zwei oder mehr Datentypen in Deklaration von »parameter« Process terminated with status 1 (0 minutes, 1 seconds) 2 errors, 0 warnings

when swapping the two includes it compiles without any problems

Change History (4)

comment:1 by Marshall Clow, 15 years ago

Component: Noneforeach
Owner: set to Eric Niebler

comment:2 by Eric Niebler, 15 years ago

I don't know what SDL_syswm.h is. attach the preprocessed source code and tell me what compiler/version you're using.

comment:3 by anonymous, 15 years ago

It's actually not a big problem, i just thought it might confuse someone else

I am using the gcc compiler: "gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)" i am still trying to figure out how to get the preprocessed code (found out there is a -E option, but didin't find out how to add include directories on the command line)

comment:4 by Eric Niebler, 14 years ago

Resolution: worksforme
Status: newclosed

Closing this as no repro. Feel free to reopen if you can attach the preprocessed source.

Note: See TracTickets for help on using tickets.