Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Perhaps there is some semantic analysis involved (I don't know what tool they're using), but I have to imagine that getColor() is defined along the lines:

    T getColor() const;
Otherwise that warning would often be at risk of emitting FP's, to the point at which it would become far less useful. Of course, even then...

    T getColor() {
        return rand(); // gotcha!
    }


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: