{"action":"created","issue":{"url":"https://api.github.com/repos/CastXML/CastXML/issues/36","labels_url":"https://api.github.com/repos/CastXML/CastXML/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/CastXML/CastXML/issues/36/comments","events_url":"https://api.github.com/repos/CastXML/CastXML/issues/36/events","html_url":"https://github.com/CastXML/CastXML/issues/36","id":116391771,"number":36,"title":"Unable to generate xml with Boost on Windows and MSVC","user":{"login":"espdev","id":1299189,"avatar_url":"https://avatars.githubusercontent.com/u/1299189?v=3","gravatar_id":"","url":"https://api.github.com/users/espdev","html_url":"https://github.com/espdev","followers_url":"https://api.github.com/users/espdev/followers","following_url":"https://api.github.com/users/espdev/following{/other_user}","gists_url":"https://api.github.com/users/espdev/gists{/gist_id}","starred_url":"https://api.github.com/users/espdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/espdev/subscriptions","organizations_url":"https://api.github.com/users/espdev/orgs","repos_url":"https://api.github.com/users/espdev/repos","events_url":"https://api.github.com/users/espdev/events{/privacy}","received_events_url":"https://api.github.com/users/espdev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-11T18:23:00Z","updated_at":"2015-11-30T16:02:25Z","closed_at":null,"body":"Hi, everyone!\r\n\r\nI'm trying to generate Python wrappings via WrapITK for my C++ project. The project also uses Boost libraries. I'm getting the following errors while generating xml for sources that include Boost headers:\r\n```\r\nIn file included from C:/Boost/boost/filesystem.hpp:16:\r\nIn file included from C:/Boost/boost/filesystem/path.hpp:25:\r\nIn file included from C:/Boost/boost/filesystem/path_traits.hpp:22:\r\nIn file included from C:/Boost/boost/type_traits/decay.hpp:18:\r\nIn file included from C:/Boost/boost/mpl/eval_if.hpp:17:\r\nC:/Boost/boost/mpl/if.hpp:131:1: error: pasting formed 'BOOST_PP_TUPLE_ELEM_O_3(', an invalid preprocessing token [-Winvalid-token-paste]\r\nBOOST_MPL_AUX_NA_SPEC(3, if_)\r\n^\r\nC:/Boost/boost/mpl/aux_/na_spec.hpp:161:40: note: expanded from macro 'BOOST_MPL_AUX_NA_SPEC'\r\n#define BOOST_MPL_AUX_NA_SPEC(i, name) \\\r\n                                       ^\r\nC:/Boost/boost/mpl/aux_/na_spec.hpp:154:47: note: expanded from macro '\\\r\nBOOST_MPL_AUX_NA_SPEC_NO_ETI'\r\n#define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \\\r\n                                              ^\r\nC:/Boost/boost/mpl/aux_/na_spec.hpp:65:9: note: expanded from macro '\\\r\nBOOST_MPL_AUX_NA_SPEC_MAIN'\r\n        BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \\\r\n        ^\r\nnote: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)\r\nC:/Boost/boost/preprocessor/tuple/elem.hpp:26:42: note: expanded from macro 'BOOST_PP_TUPLE_ELEM'\r\n#        define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__), (__VA_ARGS__))\r\n                                         ^\r\nC:/Boost/boost/preprocessor/tuple/elem.hpp:27:48: note: expanded from macro 'BOOST_PP_TUPLE_ELEM_I'\r\n#        define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args)\r\n                                               ^\r\nC:/Boost/boost/preprocessor/tuple/elem.hpp:28:64: note: expanded from macro 'BOOST_PP_TUPLE_ELEM_II'\r\n#        define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,)\r\n                                                               ^\r\n```\r\n\r\nI use Windows 7/8.1 x64 and MS VisualStudio 2013. Boost 1.56\r\n\r\nCastXML Version:\r\n```\r\ncastxml version 0.1-g2e55b35\r\n\r\nCastXML project maintained and supported by Kitware (kitware.com).\r\n\r\nclang version 3.7.0 (tags/RELEASE_370/rc1)\r\nTarget: x86_64-pc-windows-msvc\r\nThread model: posix\r\n```\r\n(Prebuilt windows binary from [here](http://midas3.kitware.com/midas/download/bitstream/456450/castxml-windows.zip))\r\n"},"comment":{"url":"https://api.github.com/repos/CastXML/CastXML/issues/comments/160671522","html_url":"https://github.com/CastXML/CastXML/issues/36#issuecomment-160671522","issue_url":"https://api.github.com/repos/CastXML/CastXML/issues/36","id":160671522,"user":{"login":"bradking","id":87268,"avatar_url":"https://avatars.githubusercontent.com/u/87268?v=3","gravatar_id":"","url":"https://api.github.com/users/bradking","html_url":"https://github.com/bradking","followers_url":"https://api.github.com/users/bradking/followers","following_url":"https://api.github.com/users/bradking/following{/other_user}","gists_url":"https://api.github.com/users/bradking/gists{/gist_id}","starred_url":"https://api.github.com/users/bradking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradking/subscriptions","organizations_url":"https://api.github.com/users/bradking/orgs","repos_url":"https://api.github.com/users/bradking/repos","events_url":"https://api.github.com/users/bradking/events{/privacy}","received_events_url":"https://api.github.com/users/bradking/received_events","type":"User","site_admin":false},"created_at":"2015-11-30T16:02:25Z","updated_at":"2015-11-30T16:02:25Z","body":"I think the problem is that CastXML is a Clang parser but is simulating MSVC's preprocessor, so Boost's preprocessor library is using MSVC-specific code instead of its implementation for Clang.  In the past with gccxml this worked because the Boost headers gained explicit knowledge of gccxml [here](https://github.com/boostorg/config/blob/boost-1.56.0/include/boost/config/select_compiler_config.hpp#L22-L24).\r\n\r\nSomething similar may be needed for CastXML, but currently CastXML does not define any macro to identify itself.\r\n"}}