> What I strongly suspect will finally happen is that clang will not fix
> these emulation problems because they are too tricky and numerous to do.
> Instead they will probably declare that their emulation is good enough for
> the majority of preprocessor constructs and that Boost PP, which pushes the
> preprocessor to its limits, is not meant to work with their flawed VC++
> emulation. I hope I am wrong about that supposition, but having spent much
> time in Boost PP and Boost VMD trying to workaround VC++ non-standard
> preprocessor behavior I can envision that having to code "down" to that
> behavior in numerous complicated instances will be too much time consuming
> work for the clang developers who have chosen to work with VC++
> preprocessor emulation.
>
I've successfully built boost-1.64 with VC1410 (from the developer command
prompt). Trying to use boost with a project using Clang 4.0.0 (both the
LLVM and C2 backends) gives me the following PP error messages:
1>------ Rebuild All started: Project: test, Configuration: Debug x64 ------
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:12:
1> In file included from
z:\vc\x64\include\boost/iterator/interoperable.hpp:11:
1> In file included from z:\vc\x64\include\boost/mpl/or.hpp:43:
1> In file included from
z:\vc\x64\include\boost/mpl/aux_/include_preprocessed.hpp:37:
1>z:\vc\x64\include\boost/mpl/aux_/preprocessed/plain/or.hpp(59,7): error :
too many arguments provided to function-like macro invocation
1> 2
1> ^
1> z:\vc\x64\include\boost/preprocessor/facilities/expand.hpp(26,10):
note: macro 'BOOST_PP_EXPAND_I' defined here
1> # define BOOST_PP_EXPAND_I(x) x
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:12:
1> In file included from
z:\vc\x64\include\boost/iterator/interoperable.hpp:11:
1> In file included from z:\vc\x64\include\boost/mpl/or.hpp:43:
1> In file included from
z:\vc\x64\include\boost/mpl/aux_/include_preprocessed.hpp:37:
1>z:\vc\x64\include\boost/mpl/aux_/preprocessed/plain/or.hpp(58,1): error :
expected a qualified name after 'typename'
1> BOOST_MPL_AUX_NA_SPEC2(
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(166,44): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC2'
1> #define BOOST_MPL_AUX_NA_SPEC2(i, j, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(64,11): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_MAIN'
1> BOOST_MPL_PP_PARAMS(i, typename T) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/preprocessor/params.hpp(58,11): note:
expanded from macro 'BOOST_MPL_PP_PARAMS'
1> , BOOST_MPL_PP_AUX_PARAM_FUNC \
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:12:
1> In file included from
z:\vc\x64\include\boost/iterator/interoperable.hpp:11:
1> In file included from z:\vc\x64\include\boost/mpl/or.hpp:43:
1> In file included from
z:\vc\x64\include\boost/mpl/aux_/include_preprocessed.hpp:37:
1>z:\vc\x64\include\boost/mpl/aux_/preprocessed/plain/or.hpp(58,1): error :
expected ',' or '>' in template-parameter-list
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(166,44): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC2'
1> #define BOOST_MPL_AUX_NA_SPEC2(i, j, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(65,9): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_MAIN'
1> BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \
1> ^
1>
z:\vc\x64\include\boost/mpl/aux_/preprocessor/def_params_tail.hpp(97,5):
note: expanded from macro 'BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL'
1> BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param,
BOOST_PP_IDENTITY(=value)) \
1> ^
1> note: (skipping 2 expansions in backtrace; use
-fmacro-backtrace-limit=0 to see all)
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(22,32): note: expanded
from macro 'BOOST_PP_CAT'
1> # define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b)
1> ^
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(31,53): note: expanded
from macro 'BOOST_PP_CAT_I'
1> # define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b)
1> ^
1> <scratch space>(8,1): note: expanded from here
1> BOOST_PP_REPEAT_1
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:12:
1> In file included from
z:\vc\x64\include\boost/iterator/interoperable.hpp:11:
1> In file included from z:\vc\x64\include\boost/mpl/or.hpp:43:
1> In file included from
z:\vc\x64\include\boost/mpl/aux_/include_preprocessed.hpp:37:
1>z:\vc\x64\include\boost/mpl/aux_/preprocessed/plain/or.hpp(58,1): error :
template argument for template type parameter must be a type
1> BOOST_MPL_AUX_NA_SPEC2(
1> ^~~~~~~~~~~~~~~~~~~~~~~
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(166,44): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC2'
1> #define BOOST_MPL_AUX_NA_SPEC2(i, j, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(68,17): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_MAIN'
1> : name< BOOST_MPL_PP_PARAMS(i, T) > \
1> ^~~~~~~~~~~~~~~~~~~~~~~~~
1> z:\vc\x64\include\boost/mpl/aux_/preprocessor/params.hpp(58,11): note:
expanded from macro 'BOOST_MPL_PP_PARAMS'
1> , BOOST_MPL_PP_AUX_PARAM_FUNC \
1> ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1> note: (skipping 5 expansions in backtrace; use
-fmacro-backtrace-limit=0 to see all)
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(31,53): note: expanded
from macro 'BOOST_PP_CAT_I'
1> # define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b)
1> ^~~~~~
1> <scratch space>(33,1): note: expanded from here
1> T2
1> ^~
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(32,37): note: expanded
from macro 'BOOST_PP_CAT_II'
1> # define BOOST_PP_CAT_II(p, res) res
1> ^~~
1> z:\vc\x64\include\boost/mpl/aux_/preprocessed/plain/or.hpp(45,39):
note: template parameter is declared here
1> , typename BOOST_MPL_AUX_NA_PARAM(T2)
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:14:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_categories.hpp:15:
1> In file included from z:\vc\x64\include\boost/mpl/eval_if.hpp:17:
1>z:\vc\x64\include\boost/mpl/if.hpp(131,23): error : too many arguments
provided to function-like macro invocation
1> BOOST_MPL_AUX_NA_SPEC(3, if_)
1> ^
1> z:\vc\x64\include\boost/preprocessor/facilities/expand.hpp(26,10):
note: macro 'BOOST_PP_EXPAND_I' defined here
1> # define BOOST_PP_EXPAND_I(x) x
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:14:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_categories.hpp:15:
1> In file included from z:\vc\x64\include\boost/mpl/eval_if.hpp:17:
1>z:\vc\x64\include\boost/mpl/if.hpp(131,1): error : expected a qualified
name after 'typename'
1> BOOST_MPL_AUX_NA_SPEC(3, if_)
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(161,40): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC'
1> #define BOOST_MPL_AUX_NA_SPEC(i, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(154,47): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_NO_ETI'
1> #define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(64,11): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_MAIN'
1> BOOST_MPL_PP_PARAMS(i, typename T) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/preprocessor/params.hpp(58,11): note:
expanded from macro 'BOOST_MPL_PP_PARAMS'
1> , BOOST_MPL_PP_AUX_PARAM_FUNC \
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:14:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_categories.hpp:15:
1> In file included from z:\vc\x64\include\boost/mpl/eval_if.hpp:17:
1>z:\vc\x64\include\boost/mpl/if.hpp(131,1): error : expected ',' or '>' in
template-parameter-list
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(161,40): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC'
1> #define BOOST_MPL_AUX_NA_SPEC(i, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(154,47): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_NO_ETI'
1> #define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(65,9): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_MAIN'
1> BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \
1> ^
1> note: (skipping 3 expansions in backtrace; use
-fmacro-backtrace-limit=0 to see all)
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(22,32): note: expanded
from macro 'BOOST_PP_CAT'
1> # define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b)
1> ^
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(31,53): note: expanded
from macro 'BOOST_PP_CAT_I'
1> # define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b)
1> ^
1> <scratch space>(4,1): note: expanded from here
1> BOOST_PP_REPEAT_1
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:14:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_categories.hpp:15:
1> In file included from z:\vc\x64\include\boost/mpl/eval_if.hpp:17:
1>z:\vc\x64\include\boost/mpl/if.hpp(131,1): error : template argument for
template type parameter must be a type
1> BOOST_MPL_AUX_NA_SPEC(3, if_)
1> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(161,40): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC'
1> #define BOOST_MPL_AUX_NA_SPEC(i, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(154,47): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_NO_ETI'
1> #define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(68,17): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_MAIN'
1> : name< BOOST_MPL_PP_PARAMS(i, T) > \
1> ^~~~~~~~~~~~~~~~~~~~~~~~~
1> note: (skipping 6 expansions in backtrace; use
-fmacro-backtrace-limit=0 to see all)
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(31,53): note: expanded
from macro 'BOOST_PP_CAT_I'
1> # define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b)
1> ^~~~~~
1> <scratch space>(29,1): note: expanded from here
1> T3
1> ^~
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(32,37): note: expanded
from macro 'BOOST_PP_CAT_II'
1> # define BOOST_PP_CAT_II(p, res) res
1> ^~~
1> z:\vc\x64\include\boost/mpl/if.hpp(53,39): note: template parameter is
declared here
1> , typename BOOST_MPL_AUX_NA_PARAM(T3)
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:14:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_categories.hpp:15:
1>z:\vc\x64\include\boost/mpl/eval_if.hpp(67,23): error : too many
arguments provided to function-like macro invocation
1> BOOST_MPL_AUX_NA_SPEC(3, eval_if)
1> ^
1> z:\vc\x64\include\boost/preprocessor/facilities/expand.hpp(26,10):
note: macro 'BOOST_PP_EXPAND_I' defined here
1> # define BOOST_PP_EXPAND_I(x) x
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:14:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_categories.hpp:15:
1>z:\vc\x64\include\boost/mpl/eval_if.hpp(67,1): error : expected a
qualified name after 'typename'
1> BOOST_MPL_AUX_NA_SPEC(3, eval_if)
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(161,40): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC'
1> #define BOOST_MPL_AUX_NA_SPEC(i, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(154,47): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_NO_ETI'
1> #define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(64,11): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_MAIN'
1> BOOST_MPL_PP_PARAMS(i, typename T) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/preprocessor/params.hpp(58,11): note:
expanded from macro 'BOOST_MPL_PP_PARAMS'
1> , BOOST_MPL_PP_AUX_PARAM_FUNC \
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:14:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_categories.hpp:15:
1>z:\vc\x64\include\boost/mpl/eval_if.hpp(67,1): error : expected ',' or
'>' in template-parameter-list
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(161,40): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC'
1> #define BOOST_MPL_AUX_NA_SPEC(i, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(154,47): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_NO_ETI'
1> #define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(65,9): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_MAIN'
1> BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \
1> ^
1> note: (skipping 3 expansions in backtrace; use
-fmacro-backtrace-limit=0 to see all)
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(22,32): note: expanded
from macro 'BOOST_PP_CAT'
1> # define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b)
1> ^
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(31,53): note: expanded
from macro 'BOOST_PP_CAT_I'
1> # define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b)
1> ^
1> <scratch space>(29,1): note: expanded from here
1> BOOST_PP_REPEAT_1
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:14:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_categories.hpp:15:
1>z:\vc\x64\include\boost/mpl/eval_if.hpp(67,1): error : template argument
for template type parameter must be a type
1> BOOST_MPL_AUX_NA_SPEC(3, eval_if)
1> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(161,40): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC'
1> #define BOOST_MPL_AUX_NA_SPEC(i, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(154,47): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_NO_ETI'
1> #define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(68,17): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_MAIN'
1> : name< BOOST_MPL_PP_PARAMS(i, T) > \
1> ^~~~~~~~~~~~~~~~~~~~~~~~~
1> note: (skipping 6 expansions in backtrace; use
-fmacro-backtrace-limit=0 to see all)
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(31,53): note: expanded
from macro 'BOOST_PP_CAT_I'
1> # define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b)
1> ^~~~~~
1> <scratch space>(32,1): note: expanded from here
1> T3
1> ^~
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(32,37): note: expanded
from macro 'BOOST_PP_CAT_II'
1> # define BOOST_PP_CAT_II(p, res) res
1> ^~~
1> z:\vc\x64\include\boost/mpl/eval_if.hpp(29,39): note: template
parameter is declared here
1> , typename BOOST_MPL_AUX_NA_PARAM(F2)
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:14:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_categories.hpp:16:
1>z:\vc\x64\include\boost/mpl/identity.hpp(40,30): error : too many
arguments provided to function-like macro invocation
1> BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, identity)
1> ^
1> z:\vc\x64\include\boost/preprocessor/facilities/expand.hpp(26,10):
note: macro 'BOOST_PP_EXPAND_I' defined here
1> # define BOOST_PP_EXPAND_I(x) x
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:14:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_categories.hpp:16:
1>z:\vc\x64\include\boost/mpl/identity.hpp(40,1): error : expected a
qualified name after 'typename'
1> BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, identity)
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(154,47): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC_NO_ETI'
1> #define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(64,11): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_MAIN'
1> BOOST_MPL_PP_PARAMS(i, typename T) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/preprocessor/params.hpp(58,11): note:
expanded from macro 'BOOST_MPL_PP_PARAMS'
1> , BOOST_MPL_PP_AUX_PARAM_FUNC \
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:14:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_categories.hpp:16:
1>z:\vc\x64\include\boost/mpl/identity.hpp(40,1): error : expected ',' or
'>' in template-parameter-list
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(154,47): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC_NO_ETI'
1> #define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(65,9): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_MAIN'
1> BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \
1> ^
1>
z:\vc\x64\include\boost/mpl/aux_/preprocessor/def_params_tail.hpp(97,5):
note: expanded from macro 'BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL'
1> BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param,
BOOST_PP_IDENTITY(=value)) \
1> ^
1> note: (skipping 2 expansions in backtrace; use
-fmacro-backtrace-limit=0 to see all)
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(22,32): note: expanded
from macro 'BOOST_PP_CAT'
1> # define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b)
1> ^
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(31,53): note: expanded
from macro 'BOOST_PP_CAT_I'
1> # define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b)
1> ^
1> <scratch space>(32,1): note: expanded from here
1> BOOST_PP_REPEAT_1
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:14:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_categories.hpp:16:
1>z:\vc\x64\include\boost/mpl/identity.hpp(40,1): error : template argument
for template type parameter must be a type
1> BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, identity)
1> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(154,47): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC_NO_ETI'
1> #define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(68,17): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_MAIN'
1> : name< BOOST_MPL_PP_PARAMS(i, T) > \
1> ^~~~~~~~~~~~~~~~~~~~~~~~~
1> z:\vc\x64\include\boost/mpl/aux_/preprocessor/params.hpp(58,11): note:
expanded from macro 'BOOST_MPL_PP_PARAMS'
1> , BOOST_MPL_PP_AUX_PARAM_FUNC \
1> ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1> note: (skipping 5 expansions in backtrace; use
-fmacro-backtrace-limit=0 to see all)
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(31,53): note: expanded
from macro 'BOOST_PP_CAT_I'
1> # define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b)
1> ^~~~~~
1> <scratch space>(32,1): note: expanded from here
1> T1
1> ^~
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(32,37): note: expanded
from macro 'BOOST_PP_CAT_II'
1> # define BOOST_PP_CAT_II(p, res) res
1> ^~~
1> z:\vc\x64\include\boost/mpl/identity.hpp(23,39): note: template
parameter is declared here
1> typename BOOST_MPL_AUX_NA_PARAM(T)
1> ^
1>z:\vc\x64\include\boost/mpl/identity.hpp(41,30): error : too many
arguments provided to function-like macro invocation
1> BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, make_identity)
1> ^
1> z:\vc\x64\include\boost/preprocessor/facilities/expand.hpp(26,10):
note: macro 'BOOST_PP_EXPAND_I' defined here
1> # define BOOST_PP_EXPAND_I(x) x
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:14:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_categories.hpp:16:
1>z:\vc\x64\include\boost/mpl/identity.hpp(41,1): error : expected a
qualified name after 'typename'
1> BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, make_identity)
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(154,47): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC_NO_ETI'
1> #define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(64,11): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_MAIN'
1> BOOST_MPL_PP_PARAMS(i, typename T) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/preprocessor/params.hpp(58,11): note:
expanded from macro 'BOOST_MPL_PP_PARAMS'
1> , BOOST_MPL_PP_AUX_PARAM_FUNC \
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_facade.hpp:14:
1> In file included from
z:\vc\x64\include\boost/iterator/iterator_categories.hpp:16:
1>z:\vc\x64\include\boost/mpl/identity.hpp(41,1): error : expected ',' or
'>' in template-parameter-list
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(154,47): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC_NO_ETI'
1> #define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(65,9): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_MAIN'
1> BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \
1> ^
1>
z:\vc\x64\include\boost/mpl/aux_/preprocessor/def_params_tail.hpp(97,5):
note: expanded from macro 'BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL'
1> BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param,
BOOST_PP_IDENTITY(=value)) \
1> ^
1> note: (skipping 2 expansions in backtrace; use
-fmacro-backtrace-limit=0 to see all)
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(22,32): note: expanded
from macro 'BOOST_PP_CAT'
1> # define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b)
1> ^
1> z:\vc\x64\include\boost/preprocessor/cat.hpp(31,53): note: expanded
from macro 'BOOST_PP_CAT_I'
1> # define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b)
1> ^
1> <scratch space>(61,1): note: expanded from here
1> BOOST_PP_REPEAT_1
1> ^
1>CL : fatal error : too many errors emitted, stopping now [-ferror-limit=]
1> 20 errors generated.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Up till now I was using a hacked boost-1.62. So in order to see what would
happen, I also built boost-1.63. Apart from a small change in
type_with_alignment.hpp (adding a ckeck for _MSC_VER not to exist if
__clang__ does exist in line 87), boost-1.63 compiles without a problem (no
specific (relevant to the emulation) command line parameters).
Is there a macro I should define or is there something else I should set/do
in order to use boost-1.64 with Clang 4.0.0 on windows? Any other
suggestions?
degski
--
"*Ihre sogenannte Religion wirkt bloß wie ein Opiat reizend, betäubend,
Schmerzen aus Schwäche stillend.*" - Novalis 1798
x_/include_preprocessed.hpp:37:
1>z:\vc\x64\include\boost/mpl/aux_/preprocessed/plain/or.hpp(58,1): error :
expected a qualified name after 'typename'
1> BOOST_MPL_AUX_NA_SPEC2(
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(166,44): note: expanded
from macro 'BOOST_MPL_AUX_NA_SPEC2'
1> #define BOOST_MPL_AUX_NA_SPEC2(i, j, name) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/na_spec.hpp(64,11): note: expanded
from macro '\
1>
1> BOOST_MPL_AUX_NA_SPEC_MAIN'
1> BOOST_MPL_PP_PARAMS(i, typename T) \
1> ^
1> z:\vc\x64\include\boost/mpl/aux_/preprocessor/params.hpp(58,11): note:
expanded from macro 'BOOST_MPL_PP_PARAMS'
1> , BOOST_MPL_PP_AUX_PARAM_FUNC \
1> ^
1> In file included from test.cpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem.hpp:16:
1> In file included from z:\vc\x64\include\boost/filesystem/path.hpp:28:
1> In file included from z:\vc\x64\include\boost/iterat
or/iterator_facade.hpp:12:
1> In file included from z:\vc\x64\include\boost/iterat
or/interoperable.hpp:11:
1> In file included from z:\vc\x64\include\boost/mpl/or.hpp:43:
1> In file included from z:\vc\x64\include\boost/mpl/au
x_/include_preprocessed.hpp:37:
1>z:\vc\x64\include\boost/mpl/aux_/preprocessed/plain/or.hpp(58,1): error :
expected ',' or '>' in template-parameter-list
> What are you trying to compile/build/run ?
>
An application that pulls in the boost::file_system headers. I am not
trying to build boost with clang. For completeness sake, I have the
following PP defines:
__clang__
BOOST_SP_USE_STD_ATOMIC
BOOST_MSVC=1900
BOOST_HAS_MS_INT64
> As explained Boost PP does not support clang-cl, which has a buggy
> emulation of the non-standard VC++ preprocessor.
You have expressed your point of view before and very clearly.
In Boost, using:
>
> using clang : 4.0 : some_path/clang++
> :
> <cxxflags>-fmacro-backtrace-limit=0
> <cxxflags>-Wno-invalid-token-paste
> <compileflags>-fmsc-version=1900
> <linkflags>-fuse-ld=lld
> ;
>
I will eventually try this, thanks for it.
> A change was made to Boost PP to support this by having Boost PP use a C++
> standard preprocessor whenever both _MSC_VER and __clang__ was defined.
Although we can now (with the above change) build boost with clang, this
also implies that we can now NOT use boost in a project on windows (i.e.
with windows headers), as the C++ standard preprocessor (the one that gets
used) does not play well with the Dinkumware-STL. If it is not clear what I
mean, please say so.
> This decision was based on the fact that VC++'s clang/c2 uses this mode
> and should work using the normal Boost Build clang.jam instead of
> clang-win.jam.
>
As I wrote before, the same PP errors are generated with both Clang/LLVM
and Clang/C2, there is no difference in behaviour between the two.
There is an additional issue that AFAICS (due to the (relatively
simplistic) way things are done by the clang team) there is no way to call
clang++.exe from the IDE. All compilers supplied by Clang/LLVM are just
copies of the same file with different names (same hash values for all
(compiler) files). A different name invokes different behaviour. msbuild
calls C:\Program Files (x86)\LLVM\msbuild-bin\cl.exe (which is just
another copy of the same compiler).
f.e. to get the build information, one has to use different commands:
>clang++ --version (linux style)
>clang-cl -v (windows style)
even though the only difference is the name (and therefor the command) of
the files.
If you (as I suspect you will) say it's a mess, I fully agree. I do think,
though, that it's less usefull to be able to build boost with clang (as it
also builds with VC), than it is to be able to use boost (compiled,
whatever way) in a project from the IDE.
boost-1.63 works (adjusted), boost-1.64 doesn't, this cannot be seen as
progress IMHO.
If I don't make sense or if I'm missing something, please tell me.
Have a good day,
degski
--
"*Ihre sogenannte Religion wirkt bloß wie ein Opiat reizend, betäubend,
Schmerzen aus Schwäche stillend.*" - Novalis 1798
_______________________________________________
> BOOST_MSVC=1900 looks odd; this macro should only be defined when the
> compiler is MSVC.
>
No, don't think so. Remember, both __MSC_VER and __clang__ are defined.
With or without this macro, the result is the same, I tried that.
> Either way, I tried
>
> #include <boost/filesystem.hpp>
>
> int main()
> {
> }
>
This works fine for me as well, I get an executable that does nothing. I
also tried it (for you), even including all the headers (just to rule out
some interaction) in the project concerned (many more), same result, still
compiles. Optimisation at work...
degski
--
"*Ihre sogenannte Religion wirkt bloß wie ein Opiat reizend, betäubend,
Schmerzen aus Schwäche stillend.*" - Novalis 1798
_______________________________________________
> This works fine for me as well, I get an executable that does nothing. I
> also tried it (for you), even including all the headers (just to rule out
> some interaction) in the project concerned (many more), same result, still
> compiles. Optimisation at work...
>
Apologies, no, it doesn't work for me (was erronously including the 1.63
headers). What macros do you have defined? Are you compiling from the IDE?
> No macros except the default (WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)),
> yes, from the IDE. I'm not using clang 4 though, but the clang that ships
> with 2017.
>
I'm also just using (a.o.) the clang that ships with 2017. I don't get
it...
Just a (I would think) stupid question: "Are the generated boost headers
different, if/when compiled with clang++?"
I'm going to do a Schwarzenegger: "I'll be back!"
degski
--
"*Ihre sogenannte Religion wirkt bloß wie ein Opiat reizend, betäubend,
Schmerzen aus Schwäche stillend.*" - Novalis 1798
_______________________________________________