Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost::Process doesn't work with #define new (boost 1.69)
From: Vivek Subramanian (tzar123_at_[hidden])
Date: 2019-02-12 04:52:32

Well, okay, but Win32 code doesn #undef new at the start, and Microsoft
themselves say to #define new for using CRT!

On Tue, Feb 12, 2019 at 12:27 AM Marshall Clow <mclow.lists_at_[hidden]>

> On Mon, Feb 11, 2019 at 10:51 AM Vivek Subramanian via Boost-users <
> boost-users_at_[hidden]> wrote:
>> Hello,
>> I did #define new for debugging memory leaks, and I get
>> this error:
> Sigh. I would have hoped that your compiler would have rejected the code
> out of hand.
> [macro.names]/2:
> A translation unit shall not #define or #undef names lexically identical
> to keywords, to the identifiers listed in Table 4, to the attribute-tokens
> described in 9.11, or to the identifiers expects or ensures, except that
> the names likely and unlikely may be defined as function-like macros (14.3).
> 'new' is a keyword listed in Table 4.
> -- Marshall

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at