This might be a problem in the formatting documentation, defining a template for operator+seems like a syntax error to me. However, by checking the corresponding header file, the definition is as follows:
template <class CharT, class Traits, class A> inline
BOOST_RV_REF_3_TEMPL_ARGS(basic_string, CharT, Traits, A)
operator+(
BOOST_RV_REF_3_TEMPL_ARGS(basic_string, CharT, Traits, A) mx
, const basic_string<CharT,Traits,A>& y)
{
mx += y;
return boost::move(mx);
}
Where a macro BOOST_RV_REF_3_TEMPL_ARGSis defined as
#define BOOST_RV_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\
TYPE<ARG1, ARG2, ARG3> && \
which looks great to me and differs from the documentation.
source
share