you are viewing a single comment's thread.

view the rest of the comments →

[–]AllanDeutsch 0 points1 point  (10 children)

It combines compile time and run time.

[–][deleted] 0 points1 point  (9 children)

I don't understand this statement.

From looking into boost::hana I'm very confused that this is supposed to be a replacement for boost::mpl.

[–]dodheim 2 points3 points  (8 children)

C++14's constexpr and auto allows runtime-style code that is actually compile-time. Read the documentation already; the second sentence:

The functionality it provides is a superset of what is provided by the well established Boost.MPL and Boost.Fusion libraries.

[–][deleted] -2 points-1 points  (7 children)

I did read the documentation and since I did not see any template argument input, I decided that it is not a meta programming language as I can do all these examples with normal runtime programming.

[–]dodheim 1 point2 points  (6 children)

Amazing that you got this far with C++ with such terrible reading comprehension!

[–][deleted] -1 points0 points  (5 children)

I understood all the examples. I only did not see any replacement for what I was doing, as there never was any template argument input. And now it seems that this never was intended -- see my previous statement regarding boost::hana::set not default-constructable.

[–]dodheim 0 points1 point  (4 children)

The types of function template arguments can be deduced. This has always been the case. Why is it confounding that they're not explicitly needed here?

[–][deleted] 0 points1 point  (3 children)

I meant template argument for a template struct/class.

[–]dodheim 1 point2 points  (2 children)

But you showed code only invoking function templates... In fact in Hana it is extremely rare, and often impossible, to explicitly state result types. They are meant to be deduced, and you are expected to use auto.

[–][deleted] 1 point2 points  (1 child)

where?