diff --git a/doc/snippets/MagnumTrade.cpp b/doc/snippets/MagnumTrade.cpp index e303c793cc..ca16be4eab 100644 --- a/doc/snippets/MagnumTrade.cpp +++ b/doc/snippets/MagnumTrade.cpp @@ -64,6 +64,8 @@ using namespace Magnum::Math::Literals; int main() { +/* GCC 4.8 and Clang 3.8 has problems with an implicit cast here */ +#if (defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT))) && (!defined(CORRADE_TARGET_GCC) || __GNUC__ > 5 || (!defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ >= 4) || (defined(CORRADE_TARGET_APPLE_CLANG) && __clang_major__ >= 9)) { /* [blob-deserialize-mesh] */ Containers::Array blob = @@ -76,6 +78,7 @@ if(!spaceship) Fatal{} << "oh no"; // ... /* [blob-deserialize-mesh] */ } +#endif { /* [AbstractImporter-usage] */ diff --git a/src/Magnum/Trade/sceneconverter.cpp b/src/Magnum/Trade/sceneconverter.cpp index 93d1ba5c56..4a3505fb72 100644 --- a/src/Magnum/Trade/sceneconverter.cpp +++ b/src/Magnum/Trade/sceneconverter.cpp @@ -115,7 +115,8 @@ class BlobImporter: public Trade::AbstractImporter { UnsignedInt doMeshCount() const override { return 1; } Containers::Optional doMesh(UnsignedInt, UnsignedInt) override { - return Trade::MeshData::deserialize(_in); + /* GCC 4.8 and old Clang has problems with an implicit cast here */ + return Trade::MeshData::deserialize(Containers::ArrayView(_in)); } Containers::Array _in;