diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2017-01-16 10:05:58 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2017-01-16 10:05:58 +0100 |
commit | 107289ca7ecf168fc02ed799b01eab663ed9bfb6 (patch) | |
tree | 616ea9d245ea0b3b468b290238ed1d7b58d6cbdb | |
parent | 3e241cdd1a6a673e2e9a3856e3e09c40879a43ab (diff) | |
download | ATCD-107289ca7ecf168fc02ed799b01eab663ed9bfb6.tar.gz |
Introduce ACE_NOEXCEPT_FALSE and use that in some places to silence C++11 compiler warnings
* ACE/ace/Global_Macros.h:
* TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp:
* TAO/tao/Storable_File_Guard.cpp:
* TAO/tao/Storable_File_Guard.h:
-rw-r--r-- | ACE/ace/Global_Macros.h | 9 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp | 5 | ||||
-rw-r--r-- | TAO/tao/Storable_File_Guard.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/Storable_File_Guard.h | 2 |
4 files changed, 13 insertions, 5 deletions
diff --git a/ACE/ace/Global_Macros.h b/ACE/ace/Global_Macros.h index f5876f77ec5..5ca0d4782b0 100644 --- a/ACE/ace/Global_Macros.h +++ b/ACE/ace/Global_Macros.h @@ -112,6 +112,15 @@ ACE_END_VERSIONED_NAMESPACE_DECL #else # define ACE_REGISTER register #endif + +// noexcept(false) specification to specify that the operation ca +// throw an exception +#if defined _MSC_VER && _MSC_VER >= 1900 || defined (ACE_HAS_CPP11) +#define ACE_NOEXCEPT_FALSE noexcept(false) +#else +#define ACE_NOEXCEPT_FALSE +#endif + // ---------------------------------------------------------------- // FUZZ: disable check_for_ACE_Guard diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp index 546e326f80a..d55cdd28519 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp @@ -29,7 +29,7 @@ namespace TAO PG_Group_List_Store_File_Guard (PG_Group_List_Store & list_store, Method_Type method_type); - ~PG_Group_List_Store_File_Guard (); + ~PG_Group_List_Store_File_Guard () ACE_NOEXCEPT_FALSE; virtual void set_object_last_changed (const time_t & time); @@ -46,7 +46,6 @@ namespace TAO virtual TAO::Storable_Base * create_stream (const char * mode); private: - PG_Group_List_Store & list_store_; }; } @@ -70,7 +69,7 @@ TAO::PG_Group_List_Store_File_Guard::PG_Group_List_Store_File_Guard ( } } -TAO::PG_Group_List_Store_File_Guard::~PG_Group_List_Store_File_Guard () +TAO::PG_Group_List_Store_File_Guard::~PG_Group_List_Store_File_Guard () ACE_NOEXCEPT_FALSE { this->release (); if (list_store_.lock_.release() == -1) diff --git a/TAO/tao/Storable_File_Guard.cpp b/TAO/tao/Storable_File_Guard.cpp index c5310a0a5fd..05a9ade6dfb 100644 --- a/TAO/tao/Storable_File_Guard.cpp +++ b/TAO/tao/Storable_File_Guard.cpp @@ -24,7 +24,7 @@ Storable_File_Guard (bool redundant, bool use_backup) } TAO::Storable_File_Guard:: -~Storable_File_Guard () +~Storable_File_Guard () ACE_NOEXCEPT_FALSE { delete fl_; } diff --git a/TAO/tao/Storable_File_Guard.h b/TAO/tao/Storable_File_Guard.h index 2929f04366b..8642d10c007 100644 --- a/TAO/tao/Storable_File_Guard.h +++ b/TAO/tao/Storable_File_Guard.h @@ -36,7 +36,7 @@ namespace TAO Storable_File_Guard (bool redundant, bool use_backup = Storable_Base::use_backup_default); - virtual ~Storable_File_Guard (); + virtual ~Storable_File_Guard () ACE_NOEXCEPT_FALSE; /// Releases the lock, closes the file, and deletes the I/O stream. /// Destructors of derived classes should call this this will |