Boost logo

Boost Users :

Subject: [Boost-users] boost iOS8 failure
From: David Medine (dmedine_at_[hidden])
Date: 2015-02-10 14:29:44


First of all, I know that calls for help are not appropriate to the
list, so let me disclaim by saying that I am not asking for help, simply
reporting an issue.

I am attempting to compile a C++ library (that uses boost) for iOS8
distribution. The library compiles fine on OSX (and Linux and Windows)
but will not compile for iOS8. I get dozens of compiler complaints
regarding boost headers that all involve some sort of 'Semantic Issue'.

For example, in boost's hash.hpp, I get a 'No matching function for call
to 'has_value' error on these lines (439-442):

| BOOST_HASH_SPECIALIZE_REF(std::string)
#if !defined(BOOST_NO_STD_WSTRING)
     BOOST_HASH_SPECIALIZE_REF(std::wstring)
#endif

|

In this case I was able to skirt the issue by adding code to define the
function hash_value for std::string and std::wstring:

     inline std::size_t hash_value(
         std::string const &v)
     {
         return hash_range(v.begin(), v.end());
     }

     inline std::size_t hash_value(
         std::wstring const &v)
     {
         return hash_range(v.begin(), v.end());
     }

I am probably going to go through all such failures of clang to
interpret the boost code correctly for iOS compilation and modify the
source just so I can get this going. This is a major pain because there
are dozens of these, many of which are far less straightforward to
remedy. Besides I don't necessarily want a custom version of boost that
ships with my library.

I have the build settings in my iOS project (I'm using XCode) exactly
the same as they are in the OSX project. I don't understand why the
compiler behaves differently for these two targets.

Finally, there are two stackoverflow questions that I posted related to
this problem.
http://stackoverflow.com/questions/28422862/clang-different-when-compiling-for-osx-and-ios
http://stackoverflow.com/questions/28308466/ios8-boost-hash-hpp-system-clock-hpp-etc-fail

THX!



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