Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost::Process doesn't work with #define new (boost 1.69)
From: Marshall Clow (mclow.lists_at_[hidden])
Date: 2019-02-11 18:57:37


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 hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net