Boost logo

Boost :

Subject: Re: [boost] [fusion] Adapter for std::array
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2013-07-05 19:47:34

On 5 July 2013 10:44, Jonathan Wakely <jwakely.boost_at_[hidden]> wrote:
> On 5 July 2013 00:57, Mateusz Loskot wrote:
>> Unfortunately, I have hit t apparently well-known problem.
>> It is the Fusion begin/end ADL issues with C++0x range-based for
>> and such, as discussed and reported here:
>> There has been no feedback to the ticket #8241, so I'm not
>> sure what is the Fusion authors' view on std::array adoption.
>> So, a couple of questions:
>> Do the Fusion authors consider any cure for the ADL issues?
> Stop using C++0x compilers and use C++11 compilers? :)
> We fixed the standard via Option 5 from


Thanks for this paper.

It is still unclear to me if/how the option 4/5 might solve the ambiguous
calls to begin/end as here:

std::array<int, 3> = {{1,2,3}};
boost::fusion::distance(begin(arr), end(arr)) == 3;

as the std::array does provide begin/end members.

AFAIU, solution that remains is to fully qualify:

boost::fusion::end(arr)) == 3;

So, the following rule kicks:

"to call begin() and end() members if they exist, and if not then to
make unqualified calls as specified in the current draft."

I'm missing something, am I not?

Best regards,

Mateusz  Loskot,

Boost list run by bdawes at, gregod at, cpdaniel at, john at