Fix for BOOST_NO_STD_ALLOCATOR when std::allocator doesn't even exist

[SVN r11349]
This commit is contained in:
Douglas Gregor
2001-10-06 20:28:27 +00:00
parent a30aa907d2
commit 62d3c6d426

View File

@ -28,6 +28,13 @@
# define BOOST_FUNCTION_INIT , invoker(0)
#endif // BOOST_FUNCTION_USE_VIRTUAL_FUNCTIONS
// Type of the default allocator
#ifndef BOOST_NO_STD_ALLOCATOR
# define BOOST_FUNCTION_DEFAULT_ALLOCATOR std::allocator<function_base>
#else
# define BOOST_FUNCTION_DEFAULT_ALLOCATOR void
#endif // BOOST_NO_STD_ALLOCATOR
namespace boost {
namespace detail {
namespace function {
@ -417,7 +424,7 @@ namespace boost {
BOOST_FUNCTION_TEMPLATE_PARMS,
typename Policy = empty_function_policy,
typename Mixin = empty_function_mixin,
typename Allocator = std::allocator<function_base>
typename Allocator = BOOST_FUNCTION_DEFAULT_ALLOCATOR
>
class BOOST_FUNCTION_FUNCTION : public function_base, public Mixin
{
@ -727,4 +734,5 @@ namespace boost {
}
// Cleanup after ourselves...
#undef BOOST_FUNCTION_DEFAULT_ALLOCATOR
#undef BOOST_FUNCTION_INIT