id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 736,Const correctness violation,Douglas Gregor,Douglas Gregor,"{{{ Boost.Function does not preserve const correctness for reference wrappers e.g. class function_object_type { public: void operator()() const {} }; void f() { const function_object_type const_function_object; boost::function function(boost::ref(const_function_object)); assert(function.target() == &const_function_object); //const lost } I can see two possible solutions for this: add a flag: enum cv_qualifiers { const_ = 1, volatile_ = 1 << 1}; or don't unwrap references for target: function.target >() The first method seems preferable because it doesn't require the interface to change. In Christ, Steven Watanabe }}}",Bugs,closed,,function,None,Problem,fixed,,