mirror of https://github.com/CGAL/cgal
Define CGAL_NORETURN also for VC++ and move the macro before the functions
This commit is contained in:
parent
a7a4966de8
commit
bcbbf35dad
|
|
@ -527,10 +527,13 @@ using std::max;
|
|||
// Macro to specify a 'noreturn' attribute.
|
||||
#if defined(__GNUG__) || __has_attribute(__noreturn__)
|
||||
# define CGAL_NORETURN __attribute__ ((__noreturn__))
|
||||
#elif defined (_MSC_VER)
|
||||
# define CGAL_NORETURN __declspec(noreturn)
|
||||
#else
|
||||
# define CGAL_NORETURN
|
||||
#endif
|
||||
|
||||
|
||||
// Macro CGAL_ASSUME
|
||||
// Call a builtin of the compiler to pass a hint to the compiler
|
||||
#if __has_builtin(__builtin_unreachable) || (CGAL_GCC_VERSION >= 40500 && !__STRICT_ANSI__)
|
||||
|
|
|
|||
|
|
@ -63,9 +63,9 @@ namespace CGAL {
|
|||
// =====================
|
||||
// failure functions
|
||||
// -----------------
|
||||
CGAL_EXPORT void assertion_fail ( const char*, const char*, int, const char* = "") CGAL_NORETURN;
|
||||
CGAL_EXPORT void precondition_fail ( const char*, const char*, int, const char* = "") CGAL_NORETURN;
|
||||
CGAL_EXPORT void postcondition_fail ( const char*, const char*, int, const char* = "") CGAL_NORETURN;
|
||||
CGAL_EXPORT CGAL_NORETURN void assertion_fail ( const char*, const char*, int, const char* = "") ;
|
||||
CGAL_EXPORT CGAL_NORETURN void precondition_fail ( const char*, const char*, int, const char* = "") ;
|
||||
CGAL_EXPORT CGAL_NORETURN void postcondition_fail ( const char*, const char*, int, const char* = "") ;
|
||||
|
||||
// warning function
|
||||
// ----------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue