On Saturday, 10 October 2015 at 02:57:03 UTC, Meta wrote:
I don't know how much metaprogramming-heavy generic code you've written, but I can say from first-hand experience that there is such a thing as Hell, and it is called Optional Parens.

Jokes aside, I've finally fixed (read: worked around using awful hacks) a bug where the compiler was complaining about either "Type.memberFunction is not callable with arguments ()" or "Need 'this' for Type.memberFunction". I love optional parens in regular code, especially range-based code (doesn't everybody?), but I desperately want a way to ensure that the symbol that I'm trying to pass to a template function won't be interpreted as a function call instead.

Well, in order to pass the result of a function call to a template parameter means that the function must be evaluated at compile time, which is not always possible, so it probably doesn't make sense to call a function when passed as a template argument.

Reply via email to