From 0eebd0e55dd610971a6ccd711278cbc480a4361e Mon Sep 17 00:00:00 2001 From: Travis CI Date: Thu, 22 Dec 2016 09:43:00 +0000 Subject: Gem cb323f8641d6d15e14a9946ad2b35c74578f6a80 linux/amd64 built 'master:cb323f8641d6d15e14a9946ad2b35c74578f6a80' for linux/amd64 --- Gem/develop/include/Gem/Gem/GLStack.h | 5 +++++ Gem/develop/include/Gem/Utils/any.h | 18 ++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) (limited to 'Gem/develop/include') diff --git a/Gem/develop/include/Gem/Gem/GLStack.h b/Gem/develop/include/Gem/Gem/GLStack.h index 2584578..4c9037c 100644 --- a/Gem/develop/include/Gem/Gem/GLStack.h +++ b/Gem/develop/include/Gem/Gem/GLStack.h @@ -65,7 +65,12 @@ class GEM_EXTERN GLStack { private: class Data; + // try using unique_ptr<> if it is supported +#if __cplusplus < 201103L std::auto_ptrdata; +#else + std::unique_ptrdata; +#endif }; } /* namespace gem */ diff --git a/Gem/develop/include/Gem/Utils/any.h b/Gem/develop/include/Gem/Utils/any.h index fc66b46..dff11bb 100644 --- a/Gem/develop/include/Gem/Utils/any.h +++ b/Gem/develop/include/Gem/Utils/any.h @@ -132,12 +132,19 @@ namespace gem template any(const T& x) : table(NULL), object(NULL) { table = any_detail::get_table::get(); +#if defined(__GNUC__) && __GNUC__ >= 6 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wplacement-new" +#endif if (sizeof(T) <= sizeof(void*)) { new(&object) T(x); } else { object = new T(x); } +#if defined(__GNUC__) && __GNUC__ >= 6 +# pragma GCC diagnostic pop +#endif } any(void) : table(NULL), object(NULL) { @@ -181,14 +188,16 @@ namespace gem if (table == x_table) { // if so, we can avoid deallocating and resuse memory +#if defined(__GNUC__) && __GNUC__ >= 6 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wplacement-new" +#endif if (sizeof(T) <= sizeof(void*)) { // create copy on-top of object pointer itself - new(&object) T(x); } else { // create copy on-top of old version - new(object) T(x); } } @@ -196,16 +205,17 @@ namespace gem reset(); if (sizeof(T) <= sizeof(void*)) { // create copy on-top of object pointer itself - new(&object) T(x); // update table pointer - table = x_table; } else { object = new T(x); table = x_table; } +#if defined(__GNUC__) && __GNUC__ >= 6 +# pragma GCC diagnostic pop +#endif } return *this; } -- cgit v1.2.1