Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-09-03 14:20:50


"Jeff Garland" <jeff_at_[hidden]> writes:

>> > My first choice was 'time'. However, as I recall I ran into some
>> > nasty macros that interfered with that name, sigh. time_point would be
>> > another possibility, but it is longer. I'm certainly open to suggestions...
>
>> Disable the macros where neccessary? You can do it temporarily and
>> provide an alias typedef.
>
> But what other code would that break if you disable the macro?

None. When you find the nonconforming platform, you find the
definition of time, and

#ifdef time
# undef time
#endif

   ... // boost date_time contents

   typedef time time_;

#ifdef WHATEVER_PLATFORM && !defined(BOOST_DATE_TIME_UNDEF_TIME)
# define time ... // old definition of time
#endif

> It's been so long that I can't even remember which platform, but
> these seems like opening a Can-O-Big-Worms....

It's a principle of Boost to avoid compromising interfaces just to
accomodate a broken compiler.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk