Boost logo

Boost Users :

From: Ewald, Christian (che_at_[hidden])
Date: 2007-10-05 02:22:16


> Is there a way to work around this problem in boost ?

We're using boost::serialization under CE. Our workaround for the missing <locale> header is the following:

First we wrote a faked <locale>-header containing just the stuff the compiler needs. This would be something like:
<snip>
#pragma once

namespace std
{
    class locale
    {
    public:
        static locale classic()
        {
            return locale();
        }
    };

    class codecvt_base
    {
    public:
        typedef int result;
    };

    template<class T1, class T2, class T3>
    class codecvt : public codecvt_base
    {
    public:
        codecvt(size_t s){}
    };
}
<snap>

After this, we had to 'patch' some boost files. In fact we removed/commented out all the stuff accessing the locale stuff.
The files we needed to patch are:
- boost/io/ios_state.hpp
- boost/archive/impl/basic_text_iprimitive.ipp
- boost/archive/impl/basic_text_oprimitive.ipp

It works fine for us.

An other way might be to use another STL implementation (like STLPort) containing the missing headers.

Regards
Christian Ewald




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net