Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
Qt Creator 2.8.0-rc, Qt Creator 2.8.0
-
None
-
windows
Description
[This code brokes syntax checker:]
#include <boost/preprocessor/seq/for_each.hpp> #include <boost/preprocessor/comma_if.hpp> #include <boost/preprocessor/variadic/size.hpp> #define PP_NARGS(...) BOOST_PP_VARIADIC_SIZE(__VA_ARGS__) #define PP_GENERATOR(r, data, elem) typename ExceptionChecker<elem>::type #define PP_WRAP_IMPL(count, ...) BOOST_PP_SEQ_FOR_EACH(PP_GENERATOR, BOOST_PP_COMMA, PP_WRAP_ ## count(__VA_ARGS__)) #define PP_WRAP(count, ...) PP_WRAP_IMPL(count, __VA_ARGS__) #define PP_WRAP_1(v1) (v1) #define PP_WRAP_2(v1, v2) (v1)(v2) #define PP_WRAP_3(v1, v2, v3) (v1)(v2)(v3) #define PP_WRAP_4(v1, v2, v3, v4) (v1)(v2)(v3)(v4) #define PP_WRAP_5(v1, v2, v3, v4, v5) (v1)(v2)(v3)(v4)(v5) #define PP_WRAP_6(v1, v2, v3, v4, v5, v6) (v1)(v2)(v3)(v4)(v5)(v6) #define PP_WRAP_7(v1, v2, v3, v4, v5, v6, v7) (v1)(v2)(v3)(v4)(v5)(v6)(v7) #define PP_WRAP_8(v1, v2, v3, v4, v5, v6, v7, v8) (v1)(v2)(v3)(v4)(v5)(v6)(v7)(v8) #define PP_WRAP_9(v1, v2, v3, v4, v5, v6, v7, v8, v9) (v1)(v2)(v3)(v4)(v5)(v6)(v7)(v8)(v9) #define PP_WRAP_10(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) (v1)(v2)(v3)(v4)(v5)(v6)(v7)(v8)(v9)(v10) #define THROWS(...)\ throw(RuntimeException, PP_WRAP(PP_NARGS(__VA_ARGS__), __VA_ARGS__)) class RuntimeException {}; class AnyOtherException {}; template <typename ExceptionT> struct ExceptionChecker { typedef ExceptionT type; };
[Using:]
void testFunc() THROWS(AnyOtherException) // <-- 'expected a declaration' with red underscore
{
}