From 2c5f97dacd40e427184c5317b91728c23545e195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 3 Aug 2018 09:50:31 +0200 Subject: [PATCH] Animation: Player move is not noexcept because compilers are weird today. I managed to work around that for Emscripten 1.38.5 by adding an explicit definition of noexcept Player::Track copy constructor/assignment, but that didn't solve anything for Emscripten, iOS or Android. Since I can't reproduce that on *anything* I have on this machine and it seems that the problem somehow just goes away when using a more recent Clang, I decided to just remove the noexcept specifier altogether. I had a temptation to make it noexcept everywhere except Clang, but that might add potential portability issues (code that works with GCC would suddenly break on Clang without any clear reason). --- src/Magnum/Animation/Player.h | 8 ++++++-- src/Magnum/Animation/Player.hpp | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Magnum/Animation/Player.h b/src/Magnum/Animation/Player.h index 3462eac04..b47ec98bf 100644 --- a/src/Magnum/Animation/Player.h +++ b/src/Magnum/Animation/Player.h @@ -256,7 +256,10 @@ template&) = delete; /** @brief Move constructor */ - Player(Player&&) noexcept; + /* The noexcept specifier was removed because it causes *extreme* + issues on various Clang versions (iOS, Android, Emscripten) + currently used on Travis CI. Not on my stock 6.0 or NDK r17 tho. */ + Player(Player&&); ~Player(); @@ -264,7 +267,8 @@ template& operator=(const Player&) = delete; /** @brief Move assignment */ - Player& operator=(Player&&) noexcept; + /* Deliberately not noexcept, see above */ + Player& operator=(Player&&); /** @brief Time-to-key scaler */ Scaler scaler() const { return _scaler; } diff --git a/src/Magnum/Animation/Player.hpp b/src/Magnum/Animation/Player.hpp index fcd17e1f8..32cf072e9 100644 --- a/src/Magnum/Animation/Player.hpp +++ b/src/Magnum/Animation/Player.hpp @@ -68,9 +68,9 @@ template struct Player::Track { }; #endif -template Player::Player(Player&&) noexcept = default; +template Player::Player(Player&&) = default; -template Player& Player::operator=(Player&&) noexcept = default; +template Player& Player::operator=(Player&&) = default; template Player::Player(): Player{Implementation::DefaultScaler::scale} {}