mirror of
https://github.com/boostorg/utility.git
synced 2025-05-08 18:34:02 +00:00
Correct in place factory example code
The example code as given won't work without const qualifiers on the pointer arguments.
This commit is contained in:
parent
9abd1fc78d
commit
bff26e4fa1
@ -256,13 +256,13 @@ struct C
|
||||
~C() { delete contained_ ; }
|
||||
|
||||
template<class InPlaceFactory>
|
||||
void construct ( InPlaceFactory const& aFactory, boost::__in_place_factory_base__* )
|
||||
void construct ( InPlaceFactory const& aFactory, const boost::__in_place_factory_base__* )
|
||||
{
|
||||
aFactory.template apply<X>(contained_);
|
||||
}
|
||||
|
||||
template<class TypedInPlaceFactory>
|
||||
void construct ( TypedInPlaceFactory const& aFactory, boost::__typed_in_place_factory_base__* )
|
||||
void construct ( TypedInPlaceFactory const& aFactory, const boost::__typed_in_place_factory_base__* )
|
||||
{
|
||||
aFactory.apply(contained_);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user