Skip to content

Commit

Permalink
Correct in place factory example code
Browse files Browse the repository at this point in the history
The example code as given won't work without const qualifiers on the pointer arguments.
  • Loading branch information
LegalizeAdulthood authored Feb 15, 2024
1 parent 9abd1fc commit bff26e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/in_place_factory.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -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_);
}
Expand Down

0 comments on commit bff26e4

Please sign in to comment.