D
Dan W.
I'm trying to resolve a disagreement between friends --Digital Mars
and BOOST-- about what the precompiler should do in a given situation:
The problem arose when I was trying to compile a boost example program
with the DM compiler, and the name of a file which was put together by
a set of macros, ended up as,
....\...\list10 .cpp
vs.
....\...\list10.cpp
(notice the space before the period)
The macro where the problem occurs is in a file called
"...boost\mpl\list.hpp", which goes:
# define MPL_AUX_LIST_HEADER
BOOST_PP_CAT(list,BLAH_LIST_SIZE).hpp \
/**/
which I was able to work-around by adding the ##, such as:
BOOST_PP_CAT(list,BLAH_LIST_SIZE)##.hpp \
/**/
I reported the problem to boost mailing list, and they said that the
compiler shouldn't be adding a space.
I reported this to the Digital Mars people and they say that the only
legal way to concatenate is with ##.
I reported again to boost, and they say that the above does not
involve concatenation, as it does not cause tokens to merge.
I reported this to DM and they insist that that is the old kludge of
'concatenation by juxtaposition'.
I reported this to boost and they say the DM compiler is relying on
the old kludge of pure textual processing, whereas tokenization should
happen first.
I think I agree with boost. Given,
#defina a(x) x
a(the_file).ext
should result in
the_file.ext
But then I'm not sure what the compiler should do if I write,
a(the_file)ext //no dot
Could someone please shed light on this issue before they shoot the
messenger? >:^0 Thanks in advance.
and BOOST-- about what the precompiler should do in a given situation:
The problem arose when I was trying to compile a boost example program
with the DM compiler, and the name of a file which was put together by
a set of macros, ended up as,
....\...\list10 .cpp
vs.
....\...\list10.cpp
(notice the space before the period)
The macro where the problem occurs is in a file called
"...boost\mpl\list.hpp", which goes:
# define MPL_AUX_LIST_HEADER
BOOST_PP_CAT(list,BLAH_LIST_SIZE).hpp \
/**/
which I was able to work-around by adding the ##, such as:
BOOST_PP_CAT(list,BLAH_LIST_SIZE)##.hpp \
/**/
I reported the problem to boost mailing list, and they said that the
compiler shouldn't be adding a space.
I reported this to the Digital Mars people and they say that the only
legal way to concatenate is with ##.
I reported again to boost, and they say that the above does not
involve concatenation, as it does not cause tokens to merge.
I reported this to DM and they insist that that is the old kludge of
'concatenation by juxtaposition'.
I reported this to boost and they say the DM compiler is relying on
the old kludge of pure textual processing, whereas tokenization should
happen first.
I think I agree with boost. Given,
#defina a(x) x
a(the_file).ext
should result in
the_file.ext
But then I'm not sure what the compiler should do if I write,
a(the_file)ext //no dot
Could someone please shed light on this issue before they shoot the
messenger? >:^0 Thanks in advance.