Re:Metaprogramming with Modern C++: The Haskell Metaphor
by pjtr on Saturday November 29, 2014 @02:32AM
(#8673328)
3: Probably because if is a keyword and can't be used.
(And it's based on ''std::conditional'' standardized in C++ 11, but that's begging the question.)
Re:Metaprogramming with Modern C++: The Haskell Metaphor
by Manu343726 on Saturday November 29, 2014 @05:17AM
(#8673504)
Exactly. if is a C++ keyword. I selected tml::conditional following the Standard std::conditional. The boost::mpl library uses mpl::if_, for example.
Re:Metaprogramming with Modern C++: The Haskell Metaphor
by Manu343726 on Saturday November 29, 2014 @05:44AM
(#8673526)
"Programming in XML notation is starting to look good, suddenly" I hate the typename ::type pattern. tml::eval helps a lot, but still involves a lot of nested template "calls". To deal with this, I'm working on a continuation system for C++ templates: https://github.com/Manu343726/Flux
I think:
1. Programming in XML notation is starting to look good, suddenly.
2.
3. Why isn't tml::conditional just called tml::if, if it (evidently) only takes three arguments: expr, then, else?