Boost logo

Boost :

Subject: [boost] [config] BOOST_NO_CXX11_ALLOCATOR and template aliases
From: Peter Dimov (lists_at_[hidden])
Date: 2014-02-05 08:32:12


VC11 appears to not define BOOST_NO_CXX11_ALLOCATOR. However, as
std::allocator_traits contains two template aliases, rebind_alloc and
rebind_traits, and VC11 doesn't support template aliases, it has nonstandard
definitions of these two.

This is obviously a problem for code that wants to use
std::allocator_traits.

One way to fix that is for the user code to check
BOOST_NO_CXX11_TEMPLATE_ALIASES and if so, refrain from using
std::allocator_traits.

Another is to just not define BOOST_NO_CXX11_ALLOCATOR for VC11. (VC12 is
conforming.)

I tend to be in favor of the second option, as the effect would essentially
be the same.


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