mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0032957: Add Standard_Noexcept definition
into Standard_Macro.hxx and employ Standard_Noexcept.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include <Standard_Std.hxx>
|
||||
#include <Standard_Stream.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Macro.hxx>
|
||||
|
||||
class Standard_Transient;
|
||||
|
||||
@@ -71,7 +72,7 @@ namespace opencascade {
|
||||
}
|
||||
|
||||
//! Move constructor
|
||||
handle (handle&& theHandle) noexcept : entity(theHandle.entity)
|
||||
handle (handle&& theHandle) Standard_Noexcept : entity(theHandle.entity)
|
||||
{
|
||||
theHandle.entity = 0;
|
||||
}
|
||||
@@ -112,7 +113,7 @@ namespace opencascade {
|
||||
}
|
||||
|
||||
//! Move operator
|
||||
handle& operator= (handle&& theHandle) noexcept
|
||||
handle& operator= (handle&& theHandle) Standard_Noexcept
|
||||
{
|
||||
std::swap (this->entity, theHandle.entity);
|
||||
return *this;
|
||||
|
@@ -315,5 +315,21 @@
|
||||
#define Standard_ATOMIC(theType) theType
|
||||
#endif
|
||||
|
||||
//! @def Standard_Noexcept
|
||||
//! Definition of Standard_Noexcept:
|
||||
//! if noexcept is accessible, Standard_Noexcept is "noexcept" and "throw()" otherwise.
|
||||
#ifdef _MSC_VER
|
||||
#if _MSC_VER >= 1900
|
||||
#define Standard_Noexcept noexcept
|
||||
#else
|
||||
#define Standard_Noexcept throw()
|
||||
#endif
|
||||
#else
|
||||
#if __cplusplus >= 201103L
|
||||
#define Standard_Noexcept noexcept
|
||||
#else
|
||||
#define Standard_Noexcept throw()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user