Merge pull request #3904 from dhustkoder/master

_DEFAULT_SOURCE flag added, and clang check version for IsTriviallyCopyable m…
This commit is contained in:
Chris Burgener
2016-06-22 10:54:39 -04:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@ -32,7 +32,12 @@
#include "Common/Logging/Log.h"
// ewww
#if _LIBCPP_VERSION || __GNUC__ >= 5
#ifndef __has_feature
#define __has_feature(x) (0)
#endif
#if (__has_feature(is_trivially_copyable) && (defined(_LIBCPP_VERSION) || defined(__GLIBCXX__))) || (defined(__GNUC__) && __GNUC__ >= 5)
#define IsTriviallyCopyable(T) std::is_trivially_copyable<typename std::remove_volatile<T>::type>::value
#elif __GNUC__
#define IsTriviallyCopyable(T) std::has_trivial_copy_constructor<T>::value