c++: Is iostream use legal in the constructor of a static object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If I have a class C and a static object
    static C obj;
is it legal to use iostream e.g. cout in the constructor for C?

If I do then I am using iostream during static initialisation but, at least 
for Gnu libstdc++, iostream depends on locale which depends on static 
initialisation of locale ids. So that would seem to me to be a real hazard.

-- 
Anthony Shipman                    Mamas don't let your babies 
als@xxxxxxxxxxxx                   grow up to be outsourced.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux