Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Apple) Clang: compiler error workaround. #51

Merged
merged 1 commit into from
Nov 15, 2022
Merged

Conversation

psiha
Copy link
Contributor

@psiha psiha commented Nov 15, 2022

Unfortunately - Clang is the new MSVC (tm) :/

(if you can add CI tests for Android and iOS or atleast OSX)

@psiha
Copy link
Contributor Author

psiha commented Nov 15, 2022

for example - then you'll catch that you also need things like:

#include <bit>
#if defined( __ANDROID__ ) || defined( __APPLE__ )
#include <boost/integer/static_log2.hpp>
namespace std
{
    template < typename Target >
    constexpr auto bit_cast ( auto const &       source ) noexcept { return __builtin_bit_cast( Target, source );   }
    consteval auto bit_width( auto         const value  ) noexcept { return boost::static_log2< value >::value + 1; }
} // namespace std
#endif

;)

@psiha
Copy link
Contributor Author

psiha commented Nov 15, 2022

you're also missing include for unwrap_ref_decay in 'some' place

@jfalcou
Copy link
Owner

jfalcou commented Nov 15, 2022

The bits part is probably just a libcpp issue. We had it with EVE and we added a clang+libcpp CI instance. We can start with that.

@jfalcou
Copy link
Owner

jfalcou commented Nov 15, 2022

For the OS X thing, I'll need to see what GA or CircleCI provides

@psiha
Copy link
Contributor Author

psiha commented Nov 15, 2022

The bits part is probably just a libcpp issue. We had it with EVE and we added a clang+libcpp CI instance. We can start with that.

Yes it is a libcpp issue - Apple is especially notorious here - as they use 'random internal' (and old) commits for their official compiler and cpp runtime releases - so they (and Android and sometimes even Emscripten) require special testing ('latest Clang' is simply just not enough)

@jfalcou
Copy link
Owner

jfalcou commented Nov 15, 2022

I added #52 to track that

@jfalcou jfalcou merged commit 1568ce7 into jfalcou:main Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants