From c0d4005441d92c08b01a0528b7825713a6378b7c Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Wed, 9 Jun 2010 15:40:48 +0000 Subject: [PATCH] Make sure that the cv flags are copied when we copy a reference to a function object. Fixes #4325 [SVN r62665] --- include/boost/function/function_base.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/function/function_base.hpp b/include/boost/function/function_base.hpp index 581aae3..78b7dd1 100644 --- a/include/boost/function/function_base.hpp +++ b/include/boost/function/function_base.hpp @@ -203,11 +203,11 @@ namespace boost { { switch (op) { case clone_functor_tag: - out_buffer.obj_ref.obj_ptr = in_buffer.obj_ref.obj_ptr; + out_buffer.obj_ref = in_buffer.obj_ref; return; case move_functor_tag: - out_buffer.obj_ref.obj_ptr = in_buffer.obj_ref.obj_ptr; + out_buffer.obj_ref = in_buffer.obj_ref; in_buffer.obj_ref.obj_ptr = 0; return;