Remove epicsThrows() macro
Exception specifications are deprecated: http://isocpp.github.io/ CppCoreGuidelines/CppCoreGuidelines.html#e30-dont-use-exception- specifications . They will be removed from the C++ standard with C++20. Modern compilers are warning about them since years. Thus it's unlikely that anyone is still using the epicsThrows() macro. Even if that's the case the fix is trivial: Simply remove the macro.
This commit is contained in:
committed by
Michael Davidsaver
parent
13234afc40
commit
218459f454
@@ -33,10 +33,8 @@
|
||||
|
||||
/*
|
||||
* CXX_PLACEMENT_DELETE - defined if compiler supports placement delete
|
||||
* CXX_THROW_SPECIFICATION - defined if compiler supports throw specification
|
||||
*/
|
||||
#define CXX_PLACEMENT_DELETE
|
||||
#define CXX_THROW_SPECIFICATION
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
@@ -40,9 +40,7 @@
|
||||
|
||||
/*
|
||||
* CXX_PLACEMENT_DELETE - defined if compiler supports placement delete
|
||||
* CXX_THROW_SPECIFICATION - defined if compiler supports throw specification
|
||||
*/
|
||||
#define CXX_THROW_SPECIFICATION
|
||||
#define CXX_PLACEMENT_DELETE
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
@@ -20,18 +20,6 @@
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
/*
|
||||
* usage: void func () epicsThrows (( std::bad_alloc, std::logic_error ))
|
||||
*
|
||||
* Note: now a widely accepted concensus (ref Meyers and C++ faq) is that
|
||||
* one should avoid using throw specifications in C++ code
|
||||
*/
|
||||
#if defined ( CXX_THROW_SPECIFICATION )
|
||||
# define epicsThrows(X) throw X
|
||||
#else
|
||||
# define epicsThrows(X)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* usage: epicsPlacementDeleteOperator (( void *, myMemoryManager & ))
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user