Boost logo

Boost :

Subject: Re: [boost] Boost and clang under Windows
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2013-09-29 15:13:01


On Sunday 29 September 2013 19:03:32 John Maddock wrote:
> > The Boost header files have numerous places where testing the macro
> > _MSC_VER produces slightly different behavior based on the fact that the
> > code is being used by VC++ or a compiler with the same behavior as VC++.
> > But clang does not have the same behavior as VC++ despite defining
> > _MSC_VER.
>
> That shouldn't really be happening - the code should check for BOOST_MSVC if
> it really want's "real" msvc and _MSC_VER just for things like #pragma once
> where some simple form of msvc emulation is required.

FWIW, there is BOOST_HAS_PRAGMA_ONCE for that purpose.

_MSC_VER can be used to detect availability of other compiler extensions, such
as _Interlocked* intrinsics or assembler dialect, for example.


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