2
0
mirror of https://github.com/boostorg/gil.git synced 2026-01-19 04:12:11 +00:00

Most members of std::allocate are deprecated in C++17

Replace them by their cousins from std::allocator_traits.

Signed-off-by: Daniela Engert <dani@ngrt.de>
This commit is contained in:
Daniela Engert
2017-12-21 15:27:38 +01:00
committed by Stefan Seefeld
parent a37469e3ad
commit bf4e22957f

View File

@@ -58,7 +58,11 @@ namespace boost { namespace gil {
template< typename Pixel, bool IsPlanar = false, typename Alloc=std::allocator<unsigned char> >
class image {
public:
#if defined(BOOST_NO_CXX11_ALLOCATOR)
typedef typename Alloc::template rebind<unsigned char>::other allocator_type;
#else
typedef typename std::allocator_traits<Alloc>::template rebind_alloc<unsigned char> allocator_type;
#endif
typedef typename view_type_from_pixel<Pixel, IsPlanar>::type view_t;
typedef typename view_t::const_t const_view_t;
typedef typename view_t::point_t point_t;