mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-27 21:08:44 +08:00
Added ETL_NOEXCEPT and ETL_NOEXCEPT_IF_NO_THROW
This commit is contained in:
parent
dffbd1e1ef
commit
aea6e7da8b
@ -371,7 +371,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
// Default constructor
|
||||
//***************************************************************************
|
||||
typed_storage()
|
||||
typed_storage() ETL_NOEXCEPT
|
||||
: valid(false)
|
||||
{
|
||||
}
|
||||
@ -381,7 +381,7 @@ namespace etl
|
||||
/// Constructs the instance of T forwarding the given \p args to its constructor.
|
||||
//***************************************************************************
|
||||
template <typename... TArgs>
|
||||
typed_storage(TArgs&&... args)
|
||||
typed_storage(TArgs&&... args) ETL_NOEXCEPT_IF_NO_THROW
|
||||
{
|
||||
create(etl::forward<TArgs>(args)...);
|
||||
}
|
||||
@ -423,7 +423,7 @@ namespace etl
|
||||
/// Default destructor which will NOT call the destructor of the object which
|
||||
/// was created by calling create().
|
||||
//***************************************************************************
|
||||
~typed_storage()
|
||||
~typed_storage() ETL_NOEXCEPT
|
||||
{
|
||||
// Intentionally empty.
|
||||
}
|
||||
@ -443,7 +443,7 @@ namespace etl
|
||||
/// \returns the instance of T which has been constructed in the internal byte array.
|
||||
//***************************************************************************
|
||||
template <typename... TArgs>
|
||||
reference create(TArgs&&... args)
|
||||
reference create(TArgs&&... args) ETL_NOEXCEPT_IF_NO_THROW
|
||||
{
|
||||
if (has_value())
|
||||
{
|
||||
@ -542,7 +542,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// Calls the destructor of the stored object, if created.
|
||||
//***************************************************************************
|
||||
void destroy()
|
||||
void destroy() ETL_NOEXCEPT
|
||||
{
|
||||
if (has_value())
|
||||
{
|
||||
@ -597,12 +597,12 @@ namespace etl
|
||||
//*******************************
|
||||
union union_type
|
||||
{
|
||||
union_type()
|
||||
union_type() ETL_NOEXCEPT
|
||||
: dummy()
|
||||
{
|
||||
}
|
||||
|
||||
~union_type()
|
||||
~union_type() ETL_NOEXCEPT
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user