mirror of
https://github.com/mcneel/opennurbs.git
synced 2026-04-23 23:06:26 +08:00
Sync changes from upstream repository
Co-authored-by: Andrew le Bihan <andy@mcneel.com> Co-authored-by: croudyj <croudyj@gmail.com> Co-authored-by: Dale Fugier <dale@mcneel.com> Co-authored-by: Dan Rigdon-Bel <dan@mcneel.com> Co-authored-by: Greg Arden <greg@mcneel.com> Co-authored-by: Jussi Aaltonen <jussi@mcneel.com> Co-authored-by: kike-garbo <kike@mcneel.com> Co-authored-by: piac <giulio@mcneel.com> Co-authored-by: Steve Baer <steve@mcneel.com> Co-authored-by: Will Pearson <will@mcneel.com>
This commit is contained in:
@@ -42,6 +42,20 @@
|
||||
//
|
||||
*/
|
||||
|
||||
/*
|
||||
// Compilers with a better static_assert declaration
|
||||
// may change ON_STATIC_ASSERT accordingly.
|
||||
*/
|
||||
#if __cpp_static_assert >= 201411L // C++17
|
||||
# define ON_STATIC_ASSERT(expr) static_assert((expr))
|
||||
# define ON_STATIC_ASSERT_MSG(expr, msg) static_assert((expr), msg)
|
||||
#elif __cpp_static_assert >= 200410L // C++11
|
||||
# define ON_STATIC_ASSERT(expr) static_assert((expr), #expr)
|
||||
# define ON_STATIC_ASSERT_MSG(expr, msg) static_assert((expr), msg)
|
||||
#else
|
||||
# define ON_STATIC_ASSERT(expr) typedef char on_static_assert_t[(expr) != 0]
|
||||
# define ON_STATIC_ASSERT_MSG(expr, msg) typedef char on_static_assert_t[(expr) != 0]
|
||||
#endif
|
||||
|
||||
/*
|
||||
// Compilers that require special declaration of callback functions
|
||||
|
||||
Reference in New Issue
Block a user