use boost::call_traits to avoid unnecessary copys