diff options
Diffstat (limited to 'Source/kwsys/hashtable.hxx.in')
-rw-r--r-- | Source/kwsys/hashtable.hxx.in | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/kwsys/hashtable.hxx.in b/Source/kwsys/hashtable.hxx.in index c835503..651de82 100644 --- a/Source/kwsys/hashtable.hxx.in +++ b/Source/kwsys/hashtable.hxx.in @@ -62,6 +62,17 @@ # pragma set woff 3970 /* pointer to int conversion */ 3321 3968 #endif +// In C++11, clang will warn about using dynamic exception specifications +// as they are deprecated. But as this class is trying to faithfully +// mimic unordered_set and unordered_map, we want to keep the 'throw()' +// decorations below. So we suppress the warning. +#if defined(__clang__) && defined(__has_warning) +# if __has_warning("-Wdeprecated") +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated" +# endif +#endif + #if @KWSYS_NAMESPACE@_STL_HAS_ALLOCATOR_TEMPLATE # define @KWSYS_NAMESPACE@_HASH_DEFAULT_ALLOCATOR(T) @KWSYS_NAMESPACE@_stl::allocator< T > #elif @KWSYS_NAMESPACE@_STL_HAS_ALLOCATOR_NONTEMPLATE @@ -1268,6 +1279,13 @@ using @KWSYS_NAMESPACE@::operator==; using @KWSYS_NAMESPACE@::operator!=; #endif +// Undo warning suppression. +#if defined(__clang__) && defined(__has_warning) +# if __has_warning("-Wdeprecated") +# pragma clang diagnostic pop +# endif +#endif + #if defined(_MSC_VER) # pragma warning (pop) #endif |