Closed jefftrull closed 4 years ago
@jefftrull Something like:
namespace boost {
namespace wave {
namespace util {
#if !defined(BOOST_NO_CXX11_ALLOCATOR)
using std::allocator_traits;
#else
template<class A>
struct allocator_traits {
typedef typename A::value_type value_type;
typedef typename A::pointer pointer;
// Fill in the rest as needed.
};
#endif
} // util
} // wave
} // boost
Looks like this problem has been solved by a few other libraries and appears to be in the public interface of Container - is it worth simply using that one? https://www.boost.org/doc/libs/1_72_0/doc/html/boost/container/allocator_traits.html
@jefftrull That would be fine too if there are no objections to Boost.Wave taking a dependency on Boost.Container (which it doesn't right now, I believe).
@glenfe @igaztanaga Another option would be to move allocator_traits
from Boost.Container to Boost.Core. There are other places where we need allocator_traits
but not the rest of Boost.Container.
Upon reflection I don't think it makes sense to add a dependency for the benefit of this one string class within one library. Unless allocator_traits
goes into Core I'll stick with a minimal local version.
The Travis job has been hung for > 24h so I'm just going to merge it.
@glenfe Thank you Glen.
Will refactor to use that in 1.74.
If merged this will resolve #84. Thanks to @qis for the assistance.