Andrej Mitrovic:

> I thought templated functions can be called without a bang if an
> argument can be deduced to be available at compile time. I know I've
> read about this somewhere, either TDPL or the docs. So I thought that
> writef checks the string literal at compile time, not runtime.

I think there is some confusion here. Each function call is done fully at 
compile time or fully at run time, there is no partial compilation. Template 
arguments always require the bang, and they are always taken at compile-time. 
Template functions may not require a bang+types if argument types can be 
inferred from the given arguments.

Bye,
bearophile

Reply via email to