Archived:Open C++ - 'id' member variable of facet class cannot be accessed directly (Known Issue)
The id member variable of a facet class cannot be accessed directly in Open C++. Instead, it has to be accessed via the GetFacetLocaleId() interface.
The following code snippet demonstrates how to use locale::id when writing an application on top of the Standard Template Library (STL).
Declare a static method GetFacetLocaleId() instead of the member variable id, when defining a class which is inherited from class locale::facet.
class base_facet : public locale::facet
static locale::id& GetFacetLocaleId(); // in place of static locale::id
In the source file, define the method GetFacetLocaleId():