diff --git a/include/boost/gil/image.hpp b/include/boost/gil/image.hpp index f2ecafcb29..0ee4cb74c1 100644 --- a/include/boost/gil/image.hpp +++ b/include/boost/gil/image.hpp @@ -58,7 +58,11 @@ namespace boost { namespace gil { template< typename Pixel, bool IsPlanar = false, typename Alloc=std::allocator > class image { public: +#if defined(BOOST_NO_CXX11_ALLOCATOR) typedef typename Alloc::template rebind::other allocator_type; +#else + typedef typename std::allocator_traits::template rebind_alloc allocator_type; +#endif typedef typename view_type_from_pixel::type view_t; typedef typename view_t::const_t const_view_t; typedef typename view_t::point_t point_t;