Order of Static Members

From: Luther Baker (lutherbaker_at_yahoo.com)
Date: 05/30/04


Date: 30 May 2004 09:24:18 -0700

Hi,

Is the order of initialization guaranteed for static members as it is
for instance members?

Namely, the order they appear the in the declaration?

ie:

foo.h:

    class Foo
    {

        ....

        private:

            static std::string header_label;

            static size_t header_len;

    };

    ....

foo.cpp

    std::string Foo::header_label ("vendor-product-0.1.1");

    //
    // Can I depend on header_label to be initialized at this point?
    //
    size_t Foo::header_len = header_label.length() +
2*(sizeof(AddressSize));

Thanks,

-Luther