compilerdetection.h File Reference

Classes

class  NULLPTR
 
class  AlignOf< T >
 
struct  AlignOf< T >::AlignmentCalcImpl< C >
 

Macros

#define MAXON_TARGET_RELEASE
 
#define decltype
 
#define static_assert(cond, str)
 
#define noexcept
 
#define alignof(C)
 
#define MAXON_SAFE_PLACEMENT_NEW(PTR)
 

Variables

const NULLPTR nullptr
 

Macro Definition Documentation

§ MAXON_TARGET_RELEASE

#define MAXON_TARGET_RELEASE

§ decltype

#define decltype

§ static_assert

#define static_assert (   cond,
  str 
)

§ noexcept

#define noexcept

§ alignof

#define alignof (   C)

§ MAXON_SAFE_PLACEMENT_NEW

#define MAXON_SAFE_PLACEMENT_NEW (   PTR)

Clang 3.7 introduced a new optimization where a placement new wont check the given ptr for nullptr. for places where the pointer is already checked outside this is a great optimization. but places that allocate memory and pass this without a check to the placement new would crash the app. example:

http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1748 http://llvm.org/viewvc/llvm-project?view=revision&revision=229213

Variable Documentation

§ nullptr

const NULLPTR nullptr