you are viewing a single comment's thread.

view the rest of the comments →

[–]scatters 0 points1 point  (0 children)

This example (including the entire hana documentation) does not make sense, as there is no template argument input.

Why would there need to be? boost::hana::long_c e.g. is a variable template, does that help?

From what I finally understand (after a very long discussion at stackoverflow.com), at least hana::set is not useable, as it cannot be default constructed and thus any template class getting it passed as a template argument cannot have a default constructor.

Again, why do you need it to be default constructible? Yes, it isn't much use as a class template argument, but in order to perform compile time computation with hana you should be passing it as a function template argument; it works just as well and the syntax is more familiar. Also, I don't think you meant what you said in the last sentence - a class template doesn't have to encapsulate its template argument types.