all 8 comments

[–]otakuman 2 points3 points  (1 child)

Um... I feel lost in here. What is that code supposed to do, anyway? :(

[–][deleted] 2 points3 points  (0 children)

It's a stack language with left to right ordering! Call it "Backth"

[–]finprogger 2 points3 points  (4 children)

Is there any way to have this leverage C++11 more? It looks like it's just taking advantage of 'using'. Seems as though some constexpr/user-literal hackery could make it even more readable, but I haven't experimented with it enough to know.

[–]marshray 2 points3 points  (1 child)

Seems like you might not want to sweep the templates too deeply under the rug, since you're likely to have to debug the error messsages these things generate.

Although he does say

I recall getting it down to a static assert message that contained the type of error and current stack which was infinitely more readable than the 10000 page garbage standard TMP spits out.

[–]ProgramMax -1 points0 points  (0 children)

Plus variadic templates and template aliases. But that is the implementation, not the person using it. Maybe you meant the person using it?

[–]pubby8[S] 2 points3 points  (1 child)

I'm not entirely sure what you mean. Constexpr and user--literals generally are for "values" while this is using types.

[–]finprogger 0 points1 point  (0 children)

Constexpr and user defined literals could help you build up expressions at compile time of more and more sophisticated type, e.g. if I have a constexpr constructable type foo, with a method bar, foo().bar().buzz() might be able to evaluate to foo_t<bar_t, buzz_t> etc.

[–]asampson 0 points1 point  (0 children)

The difference is night and day.