mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-12-02 15:46:36 +00:00
_DEFAULT_SOURCE flag added, and clang check for IsTriviallyCopyable macro
fix clang ver check for 4.0 + using clang macro __has_feature __GLIBCXX__ check added fix __has_feature
This commit is contained in:
parent
c8d0eb103a
commit
19fed720ff
@ -209,7 +209,7 @@ endmacro()
|
|||||||
# Enabling all warnings in MSVC spams too much
|
# Enabling all warnings in MSVC spams too much
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
add_definitions(-Wall)
|
add_definitions(-Wall)
|
||||||
|
add_definitions(-D_DEFAULT_SOURCE)
|
||||||
# TODO: would like these but they produce overwhelming amounts of warnings
|
# TODO: would like these but they produce overwhelming amounts of warnings
|
||||||
#check_and_add_flag(EXTRA -Wextra)
|
#check_and_add_flag(EXTRA -Wextra)
|
||||||
#check_and_add_flag(MISSING_FIELD_INITIALIZERS -Wmissing-field-initializers)
|
#check_and_add_flag(MISSING_FIELD_INITIALIZERS -Wmissing-field-initializers)
|
||||||
|
@ -32,7 +32,12 @@
|
|||||||
#include "Common/Logging/Log.h"
|
#include "Common/Logging/Log.h"
|
||||||
|
|
||||||
// ewww
|
// 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
|
#define IsTriviallyCopyable(T) std::is_trivially_copyable<typename std::remove_volatile<T>::type>::value
|
||||||
#elif __GNUC__
|
#elif __GNUC__
|
||||||
#define IsTriviallyCopyable(T) std::has_trivial_copy_constructor<T>::value
|
#define IsTriviallyCopyable(T) std::has_trivial_copy_constructor<T>::value
|
||||||
|
Loading…
Reference in New Issue
Block a user