Closed alekseyt closed 2 years ago
Another commit (8485f6d) adds missing #include "conv.hpp"
. It's required for boost::locale::conv::impl::convert_between()
to pick up converter_between
.
I'm not exactly sure what's going on here, i suspect that it won't build without precompiled headers, although i don't build it with default build tools, i'm using my own CMake scripts, so i can't tell for sure. This is what i was able to find regarding missing includes in my build.
And another commit (81a9f7f) replaces forward declaration of boost::shared_ptr
with #include <boost/shared_ptr.hpp>
.
This PR might look strange, but i'm actually trying to build a version of Boost.Locale without other parts of Boost. So i replaced <boost/shared_ptr.hpp>
(and some other files) with a shim like this:
#ifndef BOOST_SHARED_PTR_SHIM
#define BOOST_SHARED_PTR_SHIM
#include <memory>
namespace boost {
template <typename T>
using shared_ptr = std::shared_ptr<T>;
}
#endif // BOOST_SHARED_PTR_SHIM
Such forward declaration doesn't work with shim and i think correct way to use boost::shared_ptr
would be to include it anyways.
I'm trying to build a very minimally viable version of Boost.Locale with UTF-8 only implementation of gettext and trying to reduce the difference between my copy and upstream. It would be really nice if not merge this PR, then to resolve those issues in some other way.
On the side note, i'm having hard time figuring out includes order in source code, so i just placed new includes where i felt it is most appropriate in regards to how includes are ordered in source code in general. If something is in the wrong place - i would appreciate if someone would link a proper doc.
#include <algorithm>
forstd::find()
(line 521 without patch, 522 with patch).I'm guessing it was included in
locale/boundary/index.hpp
which i don't include during build, then included bylocale/boundary.hpp
and then included by something else. Or maybe it was included inboost/function.hpp
.When compiled without
locale/boundary/index.hpp
,boost/function.hpp
,boost/shared_ptr.hpp
and couple other headers, it shows the following error (GCC 8):