[C++]Use noexcept in union type move ctor/Add move assingment (#4249)

* Use noexcept in union type move ctor/Add move assingment

* Add NOEXCEPT macro to deal with _MS_VER/Remove delegating ctor in union type class

* Add FLATBUFFERS_NOEXCEPT to generated union class
This commit is contained in:
moti
2017-03-30 10:00:20 +09:00
committed by Wouter van Oortmerssen
parent 238a8ebb15
commit 2aec880347
4 changed files with 16 additions and 3 deletions

View File

@@ -113,6 +113,13 @@
#define FLATBUFFERS_CONSTEXPR
#endif
#if defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC__ * 10 + __GNUC_MINOR__ >= 46 || \
defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023026
#define FLATBUFFERS_NOEXCEPT noexcept
#else
#define FLATBUFFERS_NOEXCEPT
#endif
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable: 4127) // C4127: conditional expression is constant