On 2012-09-27 15:01, bearophile wrote:
Tommi:

2) Is it possible to specialize a function based on whether or not the
parameter that was passed in is a compile time constant?

I am interested in this since some years. I think it's useful, but I
don't know if it can be implemented. I don't remember people discussing
about this much.

There's the if (__ctfe) hack. Also using only template parameters will force the function to be CTFE.

--
/Jacob Carlborg

Reply via email to