mercredi 27 mai 2015

Why does __VA_ARGS__ variable macro expansion blows up with GCC 5.1

In file included from ./../folly/FBString.h:59:0,
                 from ./../folly/Conv.h:27,
                 from detail/CacheLocality.cpp:23:
./../folly/Traits.h:155:38: error: template argument 1 is invalid
   struct IsRelocatable<  __VA_ARGS__ > : std::true_type {};
                                      ^
./../folly/Traits.h:221:3: note: in expansion of macro 'FOLLY_ASSUME_RELOCATABLE'
   FOLLY_ASSUME_RELOCATABLE(__VA_ARGS__<T1, T2, T3>) }                   \
   ^
./../folly/Traits.h:427:1: note: in expansion of macro 'FOLLY_ASSUME_FBVECTOR_COMPATIBLE_3'
 FOLLY_ASSUME_FBVECTOR_COMPATIBLE_3(std::basic_string);
 ^
./../folly/Traits.h:171:48: error: template argument 1 is invalid
   struct has_nothrow_constructor<  __VA_ARGS__ > : ::boost::true_type {};
                                                ^
./../folly/Traits.h:224:5: note: in expansion of macro 'FOLLY_ASSUME_HAS_NOTHROW_CONSTRUCTOR'
     FOLLY_ASSUME_HAS_NOTHROW_CONSTRUCTOR(__VA_ARGS__<T1, T2, T3>) }
     ^
./../folly/Traits.h:427:1: note: in expansion of macro 'FOLLY_ASSUME_FBVECTOR_COMPATIBLE_3'
 FOLLY_ASSUME_FBVECTOR_COMPATIBLE_3(std::basic_string);
 ^
./../folly/Traits.h:155:38: error: template argument 1 is invalid
   struct IsRelocatable<  __VA_ARGS__ > : std::true_type {};
                                      ^
./../folly/Traits.h:213:3: note: in expansion of macro 'FOLLY_ASSUME_RELOCATABLE'
   FOLLY_ASSUME_RELOCATABLE(__VA_ARGS__<T1, T2>) }               \
   ^
./../folly/Traits.h:429:1: note: in expansion of macro 'FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2'
 FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2(std::list);
 ^
./../folly/Traits.h:171:48: error: template argument 1 is invalid
   struct has_nothrow_constructor<  __VA_ARGS__ > : ::boost::true_type {};
                                                ^
./../folly/Traits.h:216:5: note: in expansion of macro 'FOLLY_ASSUME_HAS_NOTHROW_CONSTRUCTOR'
     FOLLY_ASSUME_HAS_NOTHROW_CONSTRUCTOR(__VA_ARGS__<T1, T2>) }
     ^
./../folly/Traits.h:429:1: note: in expansion of macro 'FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2'
 FOLLY_ASSUME_FBVECTOR_COMPATIBLE_2(std::list);
 ^
Makefile:1395: recipe for target 'detail/CacheLocality.lo' failed

To me this looks fine, yet the compiler complains.

Aucun commentaire:

Enregistrer un commentaire