How to convert a single object to a boost::any_range?
问题 I'm trying to create and return a boost:any_range that contains only one object (I don't know if that's the core problem) but I get the following errors: error C2893: Failed to specialize function template 'range_iterator<C,void>::type boost::range_adl_barrier::begin(T &)' note: With the following template arguments: note: 'T=const WrappedRange' error C2672: 'end': no matching overloaded function found error C2893: Failed to specialize function template 'range_iterator<C,void>::type boost: