--- Comment #2 from 2010-08-07 00:14:07 PDT ---
Andrei has asked if just a pragma(msg) is enough for the error template

In some situations it works. But to use pragma(msg) you have to guard it with a
static if. So if the template constraint is a CTFE (that uses a normal 'if'
instead of a 'static if') you can't use it. While ctputs() can be used, this
shows the error message even if it's not required:

bool isGoodFoo(int x) {
    if (x > 10) {
        return true;
    } else {
        pragma(msg, "no good");
        // ctputs("no good");
        return false;
void foo(int N)() if (isGoodFoo(N)) {
void main() {

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to