|
Boost : |
From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2002-06-16 23:31:15
> What Vesa checked in didn't work for me.
> With the mpl-development branch of boost/mpl and the rest on the HEAD, I
> did this from libs/python/test:
Dave, can you change the 'preprocessor/detail/cat.hpp' header to this for me?
Vesa doesn't have CVS access for a few days, so he asked me (if I could fix the
problem) to have you apply it to the CVS. Basically, all it takes is to have an
extra 'delay' in each of these DETAIL_CAT.. macros. Your code broke when Vesa
made the "Using private detail CAT to avoid DELAY macros", and the TUPLE_ELEM
macro was inherently broken under VC++. Vesa already made the necessary changes
to BOOST_PP_TUPLE_ELEM (which was part 1), once you apply these changes below,
your code should finally compile.
--------------- boost/preprocessor/detail/cat.hpp ---------------
#ifndef BOOST_PREPROCESSOR_DETAIL_CAT_HPP
#define BOOST_PREPROCESSOR_DETAIL_CAT_HPP
/* Copyright (C) 2002 Vesa Karvonen
*
* Permission to copy, use, modify, sell and distribute this software is
* granted provided this copyright notice appears in all copies. This
* software is provided "as is" without express or implied warranty, and
* with no claim as to its suitability for any purpose.
*
* See http://www.boost.org for most recent version.
*/
#define BOOST_PP_DETAIL_CAT2(A,B) BOOST_PP_DETAIL_CAT2_DELAY(A,B)
#define BOOST_PP_DETAIL_CAT2_DELAY(A, B) BOOST_PP_DETAIL_DO_CAT2(A, B)
#define BOOST_PP_DETAIL_DO_CAT2(A,B) A##B
#define BOOST_PP_DETAIL_CAT3(A,B,C) BOOST_PP_DETAIL_CAT3_DELAY(A,B,C)
#define BOOST_PP_DETAIL_CAT3_DELAY(A,B,C) BOOST_PP_DETAIL_DO_CAT3(A,B,C)
#define BOOST_PP_DETAIL_DO_CAT3(A,B,C) A##B##C
#define BOOST_PP_DETAIL_CAT4(A,B,C,D) BOOST_PP_DETAIL_CAT4_DELAY(A,B,C,D)
#define BOOST_PP_DETAIL_CAT4_DELAY(A,B,C,D) BOOST_PP_DETAIL_DO_CAT4(A,B,C,D)
#define BOOST_PP_DETAIL_DO_CAT4(A,B,C,D) A##B##C##D
#define BOOST_PP_DETAIL_CAT5(A,B,C,D,E) BOOST_PP_DETAIL_CAT5_DELAY(A,B,C,D,E)
#define BOOST_PP_DETAIL_CAT5_DELAY(A,B,C,D,E) BOOST_PP_DETAIL_DO_CAT5(A,B,C,D,E)
#define BOOST_PP_DETAIL_DO_CAT5(A,B,C,D,E) A##B##C##D##E
#endif
--------------- end file ---------------
This will fix the problem--I tested it myself.
Paul Mensonides
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk