
18 Mar
2010
18 Mar
'10
3:09 p.m.
In C++0x, begin and end are supposed to be found through ADL, and this might end up considering fusion::begin/fusion::end as possible overloads. Unfortunately, this breaks, as fusion::begin and fusion::end produce hard errors when passed something else than a fusion sequence. All in all, I find ADL very dangerous. Should it be advocated not to use the names "begin" and "end" for something else than ranges to avoid issues? I suppose that for Fusion, it could be possible to use SFINAE to mask the overloads if the arguments aren't fusion sequences.