boostorg / move

Boost.org move module
http://boost.org/libs/move
Boost Software License 1.0
19 stars 55 forks source link

Compilation error with IBM xlC++ on AIX #19

Closed chrahunt closed 5 years ago

chrahunt commented 5 years ago

Boost version: 1.68.0 Platform: AIX 7.1 TL04 SP01 Compiler: xlC++ v13.1.3

$ xlC -qversion
IBM XL C/C++ for AIX, V13.1.3 (5725-C72, 5765-J07)
Version: 13.01.0003.0000
$ cat test.cpp
#include <boost/move/core.hpp>
int main() {}
$ xlC -I/src/boost_1_68_0 test.cpp
"/src/boost_1_68_0/boost/move/core.hpp", line 84.4: 1540-0064 (S) Syntax error:  "base specifier" was expected but "}" was found.

It looks like __attribute__((__may_alias__)) is only stated as being supported before the type name per here (in practice this only seems to be necessary on template types). Having the alias before the type in declarations is also used throughout the rest of Boost: every usage of MAY_ALIAS I could find as part of a class declaration specifies the attribute after the class/struct keyword and before the type name. e.g.