diff --git a/doc/example/patterns_invoke_functor.cpp b/doc/example/patterns_invoke_functor.cpp index a7e0676..f4d281d 100644 --- a/doc/example/patterns_invoke_functor.cpp +++ b/doc/example/patterns_invoke_functor.cpp @@ -14,7 +14,7 @@ namespace class base_class { public: - virtual void method( boost::function< void( int ) > functor ) = 0; + virtual void method( const boost::function< void( int ) >& functor ) = 0; }; void function( base_class& ); // the function will call 'method' with a functor to be applied