Boost logo

Boost :

Subject: Re: [boost] [config] defining __has_extension in suffix.hpp?
From: Rob Stewart (rob.stewart_at_[hidden])
Date: 2015-01-22 04:23:51


On January 22, 2015 3:56:12 AM EST, John Maddock <boost.regex_at_[hidden]> wrote:
> > It's useful to have
> >
> > #ifndef __has_feature
> > #define __has_feature(x) 0
> > #endif
> >
> > #ifndef __has_extension
> > #define __has_extension __has_feature
> > #endif
> >
> > in suffix.hpp so that one can then use __has_extension(foo)
> everywhere
> > without fear. Otherwise, even
> >
> > #if defined(__clang__) && defined(__has_extension) &&
> __has_extension(foo)
> >
> > is a preprocessor error when __has_extension is not defined (which
> it
> > isn't when not on Clang.)
>
> Good point.
>
> However, aren't those reserved symbols? If we're being pedantic....

I was going to point out the same. What about BOOST_HAS_FEATURE and BOOST_HAS_EXTENSION?

___
Rob

(Sent from my portable computation engine)


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