Boost logo

Boost Users :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2003-03-05 16:34:33


At 10:58 PM 3/4/2003, Douglas Gregor wrote:

>On Tuesday 04 March 2003 10:16 pm, Edward Diener wrote:
>> Beman Dawes wrote:
>> > Have you considered proposing a macro which will automatically apply
>> > the appropriate #pragma for the compiler? That way the knowledge of
>> > what #pragma to apply for each compiler only has to be maintained and
>> > tested in one place.
>>
>> Excellent idea. Now why didn't I think of that <g>. It's the old forest

>> and the trees thing, no doubt.
>>
>> The macro would have to be in the form of:
>>
>> BOOST_DATA_LAYOUT_BEGIN
>>
>> at the beginning of a header file surrounding any
class/struct/union/enum
>> declarations and
>>
>> BOOST_DATA_LAYOUT_END
>>
>> at the end.
>
>Would you willing to provide the definitions for these macros (or, as I
>suspect, begin/end headers)? I'd be happy to use them, but as I've never
>needed such a thing I don't know the particular pragmas to use.

I'm in the same boat as Doug, and I expect other Boost developers are too.

It isn't just a header (and docs) that are needed; test cases would be
important too. It would be easy for mistakes in these macros to give the
appearance of working, but actually do nothing. If I understand it, you can
only tell they are working correctly with a fairly sophisticated build test
that deliberately tries to use object files compiled with conflicting
options.

--Beman


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net