diff options
Diffstat (limited to 'src/libslic3r/Utils.hpp')
-rw-r--r-- | src/libslic3r/Utils.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libslic3r/Utils.hpp b/src/libslic3r/Utils.hpp index cfae9edd1..ed12d0559 100644 --- a/src/libslic3r/Utils.hpp +++ b/src/libslic3r/Utils.hpp @@ -159,6 +159,16 @@ template<class T> size_t next_highest_power_of_2(T v, extern std::string xml_escape(std::string text); +#if defined __GNUC__ & __GNUC__ < 5 +// Older GCCs don't have std::is_trivially_copyable +// cf. https://gcc.gnu.org/onlinedocs/gcc-4.9.4/libstdc++/manual/manual/status.html#status.iso.2011 +#warning "GCC version < 5, faking std::is_trivially_copyable" +template<typename T> struct IsTriviallyCopyable { static constexpr bool value = true; }; +#else +template<typename T> struct IsTriviallyCopyable : public std::is_trivially_copyable<T> {}; +#endif + + class ScopeGuard { public: |