Is it safe to use std::cout
in constructors of objects with statc storage duration in C++98 / C++03?
It seems from this answer that it isn't but it doesn't include any quotes from the standard.
Is it only safe to do that in C++11 and C++14?
Is it safe to use std::cout
in constructors of objects with statc storage duration in C++98 / C++03?
It seems from this answer that it isn't but it doesn't include any quotes from the standard.
Is it only safe to do that in C++11 and C++14?
From C++14 (N3797), §27.4p2:
C++98 uses similar terminology, but without the "as if" clause.
Basically, what this forbids is using the following before
main
: