Boost logo

Boost :

Subject: Re: [boost] [GSoC][MPL11] Post C++Now update
From: Larry Evans (cppljevans_at_[hidden])
Date: 2014-05-21 21:16:01


On 05/21/14 16:30, Roland Bock wrote:
> On 2014-05-21 18:42, Larry Evans wrote:
>> On 05/20/14 17:00, Roland Bock wrote:
>>> On 2014-05-20 20:59, Larry Evans wrote:
>>>> On 05/18/14 15:41, Louis Dionne wrote:
>>>>> Dear Boost,
>>>>>
>>>>> A lot happened during the past week in Aspen; the goal of this message
>>>>> is to summarize insights, changes and feedback received wrt MPL11.
>>>>>
>>>>> The slides of the presentation are available at [1]. The second
>>>>> part of
>>>>> the presentation is especially relevant to get an overview of the
>>>>> designs
>>>>> considered so far.
>>>>>
>>>>>
>>>>> Merging the MPL and Fusion
>>>>> --------------------------
>>>>> After discussing the issue several times during the week, I (and
>>>>> others)
>>>>> think it might be possible to merge Fusion and the MPL into a single
>>>>> library. I am currently trying to write a library that does that.
>>>>> Since
>>>>> this constitutes a large reorientation, I created a new repository
>>>>> which
>>>>> is available at [2]. Those with interest should consider
>>>>> subscribing to
>>>>> the repository to be updated as I make progress.
>>>>>
>>>>>
>>>>> Iterator-free design
>>>>> --------------------
>>>>> I was a bit anxious that people would complain about this, but the
>>>>> contrary
>>>>> happened. Nobody complained and some people expressed support. This
>>>>> design
>>>>> aspect will stay as-is.
>>>>>
>>>>>
>>>>> Request for guinea pigs
>>>>> -----------------------
>>>>> I am looking for people with hardcore C++1y metaprogramming needs who
>>>>> will
>>>>> be willing to test the library I come up with (MPL11 or MPL + Fusion
>>>>> merge).
>>>>> I also need to see use cases for the library, so please reply even if
>>>>> you
>>>>> are not willing to test.
>>>>>
>>>>
>>>> As mentioned in this post:
>>>>
>>>> https://groups.google.com/forum/?hl=en#!msg/comp.std.c++/_-6X_xZlKlA/-HhvKh5ccEAJ
>>>>
>>>>
>>>>
>>>> One use case is:
>>>>
>>>>> 3) A guaranteed non-recursive way to access elements of parameter
>>>>> packs
>>>>
>>>> and Doug Gregor (quoting from above post) says:
>>>>
>>>> This is probably the most-requested feature for variadic templates,
>>>> and it never it made it because we never found a good, unambiguous
>>>> syntax.
>>>>
>>>> The attached seems to do that. What about adding something
>>>> like this to the library?
>>>>
>>>> -regards,
>>>> Larry
>>>>
>>> Attached is a solution that uses C++14 index sequence (which is
>>> recursive, afaik), but is otherwise recursion free. Maybe there is a
>>> non-recursive alternative to index_sequence to "eat up" the first N-1
>>> elements?
>>>
>>> The code based on the third attachment of this clang bug report
>>> http://llvm.org/bugs/show_bug.cgi?id=13263
>>>
>>>
>>> Regards,
>>>
>>> Roland
>>>
>> Thanks very much Roland. I had no idea there was this way
>> to do it. However, I had a lot of trouble understanding
>> how it worked; hence, I added a bunch of comments, as shown
>> in the attached. After adding the comments, I now understand
>> what you mean by "eat up" the first N-1 elements.
>>
>> -regards,
>> Larry
>
> It took me quite a while, too :-)
>
> I am having a few difficulties with the documentation in the places that
> use a '+1', especially here:
>
> "return (N+1)-th ts, where 0-th ts is first one."
Yeah, you're right. I think the where clause should be
removed. I spent 10-20 minutes trying to avoid the "off by 1"
problem, but apparently wasn't entirely successful.

Thanks for the catch.
>
> With N==0, you get the argument at position 0. The above sentence seems
> to be telling something different or am I just too tired?
>
> Other than that: good job at documenting.

Thanks. I appreciate that.

> I probably would have tried to
> describe the concept instead of documenting the individual parts, but I
> find it quite hard to describe this in natural language. I'll give it
> some more thought, though :-)
>
>
> Best,
>
> Roland
>
>
>
>
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk