Boost logo

Boost :

Subject: [boost] Heads up about future standards annexing new identifiers
From: Marshall Clow (mclow.lists_at_[hidden])
Date: 2018-07-16 22:08:52


As facilities get added to the standard library, they need names. When this
happens, it restricts what other developers can and cannot do in their
programs.

For example, one cannot do this and expect most anything in the standard
library to work:

#define allocate(T) . new T

[ But you knew about that ].

What you may not have known about was that the standards committee has
voted contract enforcement/checking facilities into the draft standard
(which will probably be C++20). This includes attributes named: 'expects'
and 'ensures'. (all lower case)

I have checked all of boost, and with the possible exception of
Boost.Contract, we do not have any macros with those names.

But you might want to keep your eyes open.

-- Marshall

P.S. These are not keywords - so it's perfectly fine to have member
functions with these names. Variables, too. Probably even free functions -
though I haven't tried that. But macros are right out ;-)

P.P.S. For people who are interested, the paper is http://wg21.link/P0542


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