mirror of https://github.com/CGAL/cgal
Use [[noreturn]] directly
This commit is contained in:
parent
49244a6359
commit
0dfd416395
|
|
@ -546,13 +546,9 @@ using std::max;
|
|||
#endif
|
||||
|
||||
// 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
|
||||
// (This macro existed in CGAL before we switched to C++11. Let's keep
|
||||
// the macro defined for backward-compatibility. That cannot harm.)
|
||||
#define CGAL_NORETURN [[noreturn]]
|
||||
|
||||
// Macro to specify [[no_unique_address]] if supported
|
||||
#if __has_cpp_attribute(no_unique_address)
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ template<class NT_,class Dim_,class Max_dim_=Dim_> struct LA_eigen {
|
|||
return (int)v.cols();
|
||||
}
|
||||
|
||||
template<class Mat_> static CGAL_NORETURN NT determinant_aux(Mat_ const&, Tag_true) {
|
||||
template<class Mat_> static [[noreturn]] NT determinant_aux(Mat_ const&, Tag_true) {
|
||||
CGAL_error();
|
||||
}
|
||||
template<class Mat_> static NT determinant_aux(Mat_ const& m, Tag_false) {
|
||||
|
|
|
|||
|
|
@ -54,9 +54,9 @@ namespace CGAL {
|
|||
// =====================
|
||||
// failure functions
|
||||
// -----------------
|
||||
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* = "") ;
|
||||
CGAL_EXPORT [[noreturn]] void assertion_fail ( const char*, const char*, int, const char* = "") ;
|
||||
CGAL_EXPORT [[noreturn]] void precondition_fail ( const char*, const char*, int, const char* = "") ;
|
||||
CGAL_EXPORT [[noreturn]] void postcondition_fail ( const char*, const char*, int, const char* = "") ;
|
||||
|
||||
// warning function
|
||||
// ----------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue