// -*- C++ -*-
/***************************************************************************
 *
 * locale - Declarations for the Standard Library locale classes
 *
 ***************************************************************************
 *    
 *  Copyright 2000 Compaq Computer Corporation
 *
 *  COMPAQ Registered in U.S. Patent and Trademark Office.
 *
 *  Confidential computer software. Valid license from Compaq required for
 *  possession, use or copying. Consistent with FAR 12.211 and 12.212,
 *  Commercial Computer Software, Computer Software Documentation, and
 *  Technical Data for Commercial Items are licensed to the U.S. Government
 *  under vendor's standard commercial license.
 *
 ****************************************************************************
 *
 * (c) Copyright 1994, 1998 Rogue Wave Software, Inc.
 * ALL RIGHTS RESERVED
 *
 * The software and information contained herein are proprietary to, and
 * comprise valuable trade secrets of, Rogue Wave Software, Inc., which
 * intends to preserve as trade secrets such software and information.
 * This software is furnished pursuant to a written license agreement and
 * may be used, copied, transmitted, and stored only in accordance with
 * the terms of such license and with the inclusion of the above copyright
 * notice.  This software and information or any other copies thereof may
 * not be provided or otherwise made available to any other person.
 *
 * Notwithstanding any other lease or license that may pertain to, or
 * accompany the delivery of, this computer software and information, the
 * rights of the Government regarding its use, reproduction and disclosure
 * are as set forth in Section 52.227-19 of the FARS Computer
 * Software-Restricted Rights clause.
 * 
 * Use, duplication, or disclosure by the Government is subject to
 * restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
 * Technical Data and Computer Software clause at DFARS 252.227-7013.
 * Contractor/Manufacturer is Rogue Wave Software, Inc.,
 * P.O. Box 2328, Corvallis, Oregon 97339.
 *
 * This computer software and information is distributed with "restricted
 * rights."  Use, duplication or disclosure is subject to restrictions as
 * set forth in NASA FAR SUP 18-52.227-79 (April 1985) "Commercial
 * Computer Software-Restricted Rights (April 1985)."  If the Clause at
 * 18-52.227-74 "Rights in Data General" is specified in the contract,
 * then the "Alternate III" clause applies.
 *
 **************************************************************************/

#ifndef __STD_RWLOCALE__
#define __STD_RWLOCALE__ 1

#include <rwstderr>

#ifndef __STD_RWCOMPILER_H__
#include <stdcomp>
#endif

#ifndef __STD_STRING__
#include <string>
#endif

#ifndef __STD_IOSFWD__
#include <iosfwd>
#endif

#ifndef _RWSTD_NO_NEW_HEADER
#include <ctime>
#else
#include <time.h>
#endif

#ifndef _RWSTD_NO_BAD_CAST
#include <typeinfo>
#endif

#if defined(__DECCXX)
#   ifdef __PRAGMA_ENVIRONMENT
#      pragma __environment __save
#      pragma __environment __header_defaults
#   endif
#endif

// In case these are (wrongly!) defined as macros in <cctype>.

#undef isspace
#undef isprint
#undef iscntrl
#undef isupper
#undef islower
#undef isalpha
#undef isdigit
#undef ispunct
#undef isxdigit
#undef isalnum
#undef isgraph
#undef toupper
#undef tolower

#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)
#pragma __extern_prefix __save
#pragma __extern_prefix "CXXL$" 
#endif

#ifndef _RWSTD_NO_NAMESPACE
namespace _RWrwstd {
#endif

#ifdef _RWSTD_LOCALIZED_ERRORS
  extern const unsigned int _RWSTDExport _RWrw_LocaleNotPresent;
#else
  extern const char _RWSTDExportFunc(*) _RWrw_LocaleNotPresent;
#endif

#ifndef _RWSTD_NO_NAMESPACE
} namespace std {
#endif

// Forward declarations of functions and classes specified by the locale clause
// of the C++ Standard Library working paper.

class _RWSTDExport locale;

#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
  template <class Facet> inline const Facet& use_facet (const locale&);
  template <class Facet>
    inline bool has_facet (const locale&) _RWSTD_THROW_SPEC_NULL;
#else
  template <class Facet>
    _RWSTD_TRICKY_INLINE const Facet& use_facet (const locale&, Facet*);
  template <class Facet>
    inline bool has_facet (const locale&, Facet*) _RWSTD_THROW_SPEC_NULL;
#endif // _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE

template <class charT> inline bool isspace  (charT c, const locale&);
template <class charT> inline bool isprint  (charT c, const locale&);
template <class charT> inline bool iscntrl  (charT c, const locale&);
template <class charT> inline bool isupper  (charT c, const locale&);
template <class charT> inline bool islower  (charT c, const locale&);
template <class charT> inline bool isalpha  (charT c, const locale&);
template <class charT> inline bool isdigit  (charT c, const locale&);
template <class charT> inline bool ispunct  (charT c, const locale&);
template <class charT> inline bool isxdigit (charT c, const locale&);
template <class charT> inline bool isalnum  (charT c, const locale&);
template <class charT> inline bool isgraph  (charT c, const locale&);

template <class charT> inline charT toupper (charT c, const locale&);
template <class charT> inline charT tolower (charT c, const locale&);

class ctype_base;
template <class charT> class ctype;
_RWSTD_TEMPLATE class _RWSTDExport ctype<char>;
template <class charT> class ctype_byname;
_RWSTD_TEMPLATE class _RWSTDExport ctype_byname<char>;
class codecvt_base;
template  <class internT, class externT, class stateT> class codecvt;
_RWSTD_TEMPLATE class _RWSTDExport codecvt<char,char,mbstate_t>;     // (imp)

#ifndef _RWSTD_NO_WIDE_CHAR
_RWSTD_TEMPLATE class _RWSTDExport ctype<wchar_t>;               // (imp)
_RWSTD_TEMPLATE class _RWSTDExport ctype_byname<wchar_t>;
_RWSTD_TEMPLATE class _RWSTDExport codecvt<wchar_t,char,mbstate_t>;  // (imp)
#endif // _RWSTD_NO_WIDE_CHAR

template <class internT, class externT, class stateT> class codecvt_byname;

template <class charT,
    class InputIterator _RWSTD_COMPLEX_DEFAULT(istreambuf_iterator<charT>)>
    class num_get;
template <class charT,
    class OutputIterator _RWSTD_COMPLEX_DEFAULT(ostreambuf_iterator<charT>)>
    class num_put;
template <class charT> class numpunct;
template <class charT> class numpunct_byname;

template <class charT> class collate;
template <class charT> class collate_byname;

class time_base;
template <class charT,
    class InputIterator _RWSTD_COMPLEX_DEFAULT(istreambuf_iterator<charT>)>
    class time_get;
template <class charT,
    class InputIterator _RWSTD_COMPLEX_DEFAULT(istreambuf_iterator<charT>)>
    class time_get_byname;
template <class charT,
    class OutputIterator _RWSTD_COMPLEX_DEFAULT(ostreambuf_iterator<charT>)>
    class time_put;
template <class charT,
    class OutputIterator _RWSTD_COMPLEX_DEFAULT(ostreambuf_iterator<charT>)>
    class time_put_byname;

class _RWSTDExport money_base;
template <class charT,
    class InputIterator _RWSTD_COMPLEX_DEFAULT(istreambuf_iterator<charT>)>
    class money_get;
template <class charT,
    class OutputIterator _RWSTD_COMPLEX_DEFAULT(ostreambuf_iterator<charT>)>
    class money_put;
template <class charT, bool Intl _RWSTD_SIMPLE_DEFAULT(false)>
    class moneypunct;
template <class charT, bool Intl _RWSTD_SIMPLE_DEFAULT(false)>
    class moneypunct_byname;

class messages_base;
template <class charT> class messages;
template <class charT> class messages_byname;

// Instantiations that go in the library:

#ifdef __TURBOC__

typedef istreambuf_iterator<char,char_traits<char> > _RWisit;
typedef ostreambuf_iterator<char,char_traits<char> > _RWosit;

template class _RWSTDExport codecvt_byname<char,char,mbstate_t>;
template class _RWSTDExport num_get<char,_RWisit>;
template class _RWSTDExport num_put<char,_RWosit>;
template class _RWSTDExport numpunct<char>;
template class _RWSTDExport numpunct_byname<char>;
template class _RWSTDExport collate<char>;
template class _RWSTDExport collate_byname<char>;
template class _RWSTDExport time_get<char,_RWisit>;
template class _RWSTDExport time_put<char,_RWosit>;
template class _RWSTDExport money_get<char,_RWisit>;
template class _RWSTDExport money_put<char,_RWosit>;
template class _RWSTDExport moneypunct<char,false>;
template class _RWSTDExport moneypunct<char,true>;
template class _RWSTDExport moneypunct_byname<char,false>;
template class _RWSTDExport moneypunct_byname<char,true>;
template class _RWSTDExport messages<char>;
template class _RWSTDExport messages_byname<char>;

#ifndef _RWSTD_NO_WIDE_CHAR

typedef istreambuf_iterator<wchar_t,char_traits<wchar_t> > _RWwisit;
typedef ostreambuf_iterator<wchar_t,char_traits<wchar_t> > _RWwosit;

template class _RWSTDExport codecvt_byname<wchar_t,wchar_t,mbstate_t>;
template class _RWSTDExport num_get<wchar_t,_RWwisit>;
template class _RWSTDExport num_put<wchar_t,_RWwosit>;
template class _RWSTDExport numpunct<wchar_t>;
template class _RWSTDExport numpunct_byname<wchar_t>;
template class _RWSTDExport collate<wchar_t>;
template class _RWSTDExport collate_byname<wchar_t>;
template class _RWSTDExport time_get<wchar_t,_RWwisit>;
template class _RWSTDExport time_put<wchar_t,_RWwosit>;
template class _RWSTDExport money_get<wchar_t,_RWwisit>;
template class _RWSTDExport money_put<wchar_t,_RWwosit>;
template class _RWSTDExport moneypunct<wchar_t,false>;
template class _RWSTDExport moneypunct<wchar_t,true>;
template class _RWSTDExport moneypunct_byname<wchar_t,false>;
template class _RWSTDExport moneypunct_byname<wchar_t,true>;
template class _RWSTDExport messages<wchar_t>;
template class _RWSTDExport messages_byname<wchar_t>;

#endif // _RWSTD_NO_WIDE_CHAR

#endif // __TURBOC__

#ifndef _RWSTD_NO_NAMESPACE
} // namespace std
#endif

#ifndef __STD_RW_LOCIMPL__
#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)
#   pragma __extern_prefix __restore
#endif
#include <locimpl>
#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)
#pragma __extern_prefix __save
#pragma __extern_prefix "CXXL$" 
#endif
#endif

#ifndef _RWSTD_NO_NAMESPACE
namespace std {
#endif

// -------------
// Class locale.
// -------------

class _RWSTDExport locale {
 public:
  class facet;
  class id;

  friend class facet;
  friend class id;

  typedef int category;

  // The following constants identify standard categories of facets.  The
  // standard specifies them as const members of type category (i.e. as const
  // ints).  For compilers that can't initialize const members here, we define
  // them as members of an anonymous enum instead.

  // Some compilers get confused by the name collision of these constants with
  // the facet templates collate, ctype and messages.  As a work-around, we
  // also define non-standard names of the form _RWrw_xxx_category for these
  // three categories.  If you have one of the confused compilers (i.e. if
  // _RWSTD_CONFUSED_ENUM_SCOPE is #defined for you), you must use these non-
  // standard category names.

  #ifndef _RWSTD_CONFUSED_ENUM_SCOPE
  #define _RWSTD_CATEGORY_NAMES                             \
    collate = 0x0010, ctype = 0x0020, monetary = 0x0040,    \
    numeric = 0x0080, time  = 0x0100, messages = 0x0200,    \
    all     = 0x03f0, none  = 0x0000
  #else
  #define _RWSTD_CATEGORY_NAMES                             \
    monetary = 0x0040, numeric = 0x0080, time  = 0x0100,    \
    all      = 0x03f0, none  = 0x0000
  #endif

  #define _RWSTD_IMPLEMENTATION_VALS                                  \
    _RWrw_collate_category  = 0x0010, _RWrw_ctype_category    = 0x0020, \
    _RWrw_messages_category = 0x0200, _RWrw_Clib_LC_constants = 0x000F, \
    _RWrw_num_categories    = 6,      _RWrw_first_category    = 0x0010

  #ifndef _RWSTD_NO_STI_SIMPLE
  static const category _RWSTD_CATEGORY_NAMES, _RWSTD_IMPLEMENTATION_VALS;
  #else
  enum { _RWSTD_CATEGORY_NAMES, _RWSTD_IMPLEMENTATION_VALS };
  #endif

  #undef _RWSTD_CATEGORY_NAMES
  #undef _RWSTD_IMPLEMENTATION_VALS

  // The default constructor creates a copy of the current global locale.
  // This is the locale specified in the most recent call to locale::global().
  // If locale::global() has not been called, it is the classic "C" locale.

  inline locale () _RWSTD_THROW_SPEC_NULL;

  // The copy constructor (and the assignment operator, below) can be used
  // freely.  Like a string, most of a locale's contents are in a separate,
  // reference-counted implementation object, so copying and assigning locales
  // has little overhead.

  inline locale (const locale& other) _RWSTD_THROW_SPEC_NULL;

  // The following constructor creates a locale composed of by-name facets and
  // assigns it a name.  The valid arguments are "", "C", and a set of strings
  // defined by the compiler vendor.  These cause the facets of the locale to
  // be obtained, respectively, from the user's preferred locale, from the
  // classic locale, or from the compiler's locale database.  (In many cases,
  // the preferred locale is specified by environment variables such as LANG
  // or LC_ALL.)  If the argument is not recognized, the constructor throws
  // runtime_error.

  _EXPLICIT locale (const char* name);

  // The following constructor copies its first argument except for the facets
  // in the categories identified by the third argument, which are obtained by
  // name using the second argument.  Can throw runtime_error.

  locale (const locale& other, const char* name, category);

  // The following templatized constructor is only available if your compiler
  // supports member function templates.  It copies its first argument except
  // the single facet of type Facet, which it gets from the second argument.

  #ifndef _RWSTD_NO_MEMBER_TEMPLATES

  template <class Facet>
  inline locale (const locale& other,Facet* f);

  #else

  // If your compiler does not support member function templates, we provide
  // the following work-around to let you accrete facets onto a locale.  This
  // constructor copies its first argument except for the single facet of the
  // type of the second argument, for which it uses the second argument.
  //
  // To determine the type of the second argument, it calls the non-standard
  // virtual method _RWget_id in the second argument.  If you are creating your
  // own facet types on a compiler that does not support member templates, you
  // must code a _RWget_id member as follows in each new base class facet (i.e.
  // in each facet class that has its own static member id of type locale::id):
  //
  //    virtual locale::id &_RWget_id (void) const { return id; }
  //
  // See the _RWget_id members in the standard facets below for examples.

  inline locale (const locale& other, facet* f);

  #endif // _RWSTD_NO_MEMBER_TEMPLATES

  // The following constructor copies its first argument except for the facets
  // in the categories identified by the third argument, which are obtained
  // from the second argument.

  locale (const locale &other, const locale &second, category);

  // The destructor is non-virtual.  Other classes are not supposed to be
  // derived from locale.

  ~locale ()
  {
    __RWSTD::ref_counted::remove_reference(_RWimp);
  }

  const locale& operator = (const locale& other) _RWSTD_THROW_SPEC_NULL;

  // The following member function template is available only if your compiler
  // supports member templates that are templatized on types that don't appear
  // in the argument list.  It returns a copy of this locale (*this) except
  // the single facet of type Facet, which it gets from the other locale.

  #ifndef _RWSTD_NO_MEMBER_TEMPLATES
  #ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
  template <class Facet>
#if defined(__DECCXX) && !defined(__DECFIXCXXL1092)
  inline locale combine (const locale& other) const;
#else
  inline locale combine (const locale& other);
#endif
  #endif // _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE
  #endif // _RWSTD_NO_MEMBER_TEMPLATES

  // The following returns the locale name, or "*" if the locale is unnamed.

  string name () const;

  // Two locales are equal if they are the same object, or one is a copy of the
  // other (i.e. they have the same implementation object), or both are named
  // and their names are the same.

  bool operator == (const locale& other) const;
  bool operator != (const locale& other) const { return !(*this==other); }

  // The following templatized operator () satisfies STL requirements for a
  // comparator predicate template argument for comparing strings according to
  // the collating sequence of the locale.  It lets you use a locale directly
  // as a comparator using syntax like sort(v.begin(),v.end(),loc), where v is
  // a vector of some string type and loc is a locale.  If your compiler does
  // not support member function templates, we provide explicit support for
  // string and (if applicable) wstring.

  #ifndef _RWSTD_NO_MEMBER_TEMPLATES
  template <class charT, class Traits, class Allocator>
  bool operator() (const basic_string<charT,Traits,Allocator>& s1,
                   const basic_string<charT,Traits,Allocator>& s2) const;
  #else
  bool operator() (const string &s1,const string &s2) const;
  #ifndef _RWSTD_NO_WIDE_CHAR
  bool operator() (const wstring &s1,const wstring &s2) const;
  #endif
  #endif

  // Static members.

  static locale global (const locale&);  // Replaces the current global locale
  static const locale &classic ();       // Returns the classic "C" locale

  // class facet -- base class for locale feature sets.

  // Any class deriving from facet that wants to be perceived as a distinct
  // facet, as opposed to a re-implementation of an existing facet, must
  // declare a static member: static std::locale::id id;

  class facet: public __RWSTD::facet_imp {
    friend class __RWSTD::locale_imp;
    friend class locale;
   protected:
    _EXPLICIT facet (size_t refs=0,int cat=0):
        __RWSTD::facet_imp(refs,cat) { }

    virtual ~facet() { }

    #ifdef _RWSTD_NO_MEMBER_TEMPLATES
    virtual id &_RWget_id (void) const=0;
    #endif

   private:
    facet (const facet&);           // not defined
    void operator = (const facet&); // not defined
  };

  // class id -- facet type identifier.

  // This is mostly an implementation class.  It is used internally as an index
  // to find facets within a locale.  Each distinct facet (i.e. each T that can
  // be the parameter of a use_facet<T> call) has a unique static member of type
  // locale::id named id.  The class is made public to enable extension of the
  // set of standard facets.  Objects of this type don't need to be constructed
  // or referenced in any other circumstances.

  class id: private __RWSTD::locale_id_imp {
    _RWSTD_FRIEND_USE_HAS_FACET
    friend class locale;
#ifdef  _MSC_VER
   public:
#endif
#ifdef _HPACC_
    operator size_t () const { return __RWSTD::locale_id_imp::_RWid_value; }
#else
    operator size_t () const { return _RWid_value; }
#endif

    // The private copy constructor and assignment operator help restrict the
    // class to its intended use.  The copy constructor prevents the compiler
    // from generating a do-nothing default constructor, so we provide one.
    // We omit the constructors on compilers that don't support static template
    // members with constructors.

#ifndef _RWSTD_NO_STATIC_DEF3
   public:
    id () { }
   private:
    id (const id&);
#endif
   private:
    void operator = (const id&);
  };

 private:

  // Implementation.
  friend class __RWSTD::locale_imp;
  _RWSTD_FRIEND_USE_HAS_FACET

#ifdef _MSC_VER
 public:
#endif

  // The only data member is a pointer to a ref-counted implementation object:
  __RWSTD::locale_imp *_RWimp;

  // Typedef for the implementation-defined call-back functions that must be
  // passed to _RWmake_explicit (below).
  typedef __RWSTD::facet_maker_func _RWfacet_maker_func;

  // The following function retrieves an implicit facet from a cache,
  // or creates one if needed (via call to the passed call-back
  // function), and makes it an explicit facet of the locale.

  __RWSTD::facet_imp * _RWmake_explicit (const id &facet_id, bool ok_implicit,
       category facet_cat, _RWfacet_maker_func maker) const;

  inline __RWSTD::facet_imp *get_facet (size_t) const;

#ifdef _MSC_VER
 private:
#endif

  void _RWinstall (__RWSTD::facet_imp *f, const id& i) const;

  static __RWSTD::locale_imp *_RWthe_classic_locale;
  static __RWSTD::locale_imp *_RWthe_native_locale;
  static __RWSTD::locale_imp *_RWglobal;

  // Construct a locale from an implementation object.
  inline _EXPLICIT locale (__RWSTD::locale_imp *m);

 private:
  // We have to say private again in case _RWSTD_FRIEND_USE_HAS_FACET evaluated
  // to public:

  // Create initial implementation objects.
  static void init ();
};

#undef _RWSTD_FRIEND_USE_HAS_FACET

// ----------------------------
// Class locale inline members.
// ----------------------------

// Private constructor for use by implementation, constructs a locale from
// a locale_imp implementation object.
inline locale::locale (__RWSTD::locale_imp *m): _RWimp(m) {
  if (!_RWglobal) init();
  __RWSTD::ref_counted::add_reference(_RWimp);
}

// Default constructor, returns a copy of the current global locale.
inline locale::locale () _RWSTD_THROW_SPEC_NULL {
  if (!_RWglobal) init(); // This is not throw() ... something has to give.
  __RWSTD::ref_counted::add_reference(_RWimp=_RWglobal);
}

// Copy constructor.
inline locale::locale (const locale& other) _RWSTD_THROW_SPEC_NULL {
  __RWSTD::ref_counted::add_reference(_RWimp=other._RWimp);
}

#ifndef _RWSTD_NO_MEMBER_TEMPLATES

// Constructor to accrete or replace a single facet.
template <class Facet>
inline locale::locale (const locale& other, Facet* f)
{
  if (f) {
    _RWimp=new __RWSTD::locale_imp (*other._RWimp,1);
    _RWinstall(f,Facet::id);
    _RWimp->named_=false;
  } else
    __RWSTD::ref_counted::add_reference(_RWimp=other._RWimp);
}

#ifndef _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE

template <class Facet>
#if defined(__DECCXX) && !defined(__DECFIXCXXL1092)
inline locale locale::combine (const locale& other) const
#else
inline locale locale::combine (const locale& other)
#endif
{
  return locale (*this,&use_facet<Facet>(other));
}

#endif /* _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE */

#else

inline locale::locale (const locale& other, facet* f):
    _RWimp(new __RWSTD::locale_imp (*other._RWimp,1))
{
  _RWinstall(f,f->_RWget_id());
  _RWimp->named_=false;
}

#endif // _RWSTD_NO_MEMBER_TEMPLATES


// Private implementation helper function.
inline __RWSTD::facet_imp* locale::get_facet (size_t i) const {
  return _RWimp->get_facet(i);
}


#if defined(__DECCXX) && !defined(__DECFIXCXXL646)
// -----------------------------------------------
// Locale Manager class used by all byname classes
// to load/restore/unload the facet's locale
// -----------------------------------------------

class _LocaleManager {
 private:
  int _category;                // LC_xxx category associated with the facet
  const char* _NewLocaleName;   // external name of facet's locale
  char *_OldLocaleInternalName; // internal name of current program's C locale
  char *_NewLocaleInternalName; // internal name of facet's locale

 public:
  _EXPLICIT _LocaleManager(int category, const char* LocaleName);
  virtual   ~_LocaleManager();

  virtual int _SetNewLocale();
  virtual int _RestoreOldLocale();
};

#endif // 646

#ifndef _RWSTD_NO_NAMESPACE
} namespace _RWrwstd {
#endif


// -------------------------------------------------------
// Implementation function template -- create_named_facet.
// -------------------------------------------------------
// 
// The default for facets with no derived byname version is to create a facet
// with classic ("C") behavior, ignoring the passed name.

template <class Facet>
inline Facet* create_named_facet (Facet*,const char* name,size_t refs)
{
  return new Facet(refs);
}

#ifndef _RWSTD_NO_NAMESPACE
} // namespace _RWrwstd
#endif

#if defined(__VMS) && defined(__DECCXX) && !defined(__DECFIXCXXL1158)
#   pragma __extern_prefix __restore
#endif

// Get declarations for vendor-defined extensions, such as 
// declarations of the facets of the native ("") locale.
#include <vendor>

#ifdef _RWSTD_COMPILE_INSTANTIATE
#include <rwlocale.cc>
#endif


#if defined(__DECCXX)
#   ifdef __PRAGMA_ENVIRONMENT
#      pragma __environment __restore
#   endif
#endif

#endif // __STD_RWLOCALE__

