Commit 5c5e77a7 authored by Sean McBride's avatar Sean McBride Committed by Code Review
Browse files

Merge topic 'dyn-excp-spec-in-utf8' into master

e58852e9 Suppress clang dynamic exception specifiers warning
parents b55bb071 e58852e9
......@@ -12,6 +12,9 @@ class. We've made several VTK-specific modifications to support older compilers
* Altered utf16to8() to work with vtkstd::back_insert_iterator, which also reduces the
generality of the library.
* Suppress clang warnings about dynamic exception specifiers on a few methods. The methods need
to keep the "throw()" on their declaration to be compatible with their superclass in C++98.
For these reasons, we strongly discourage use of the VTK-specific version of UTF8-CPP, which is
a private part the VTK API, and subject to removal or revision at any time. See the following
links for the full version of the library:
......
......@@ -31,6 +31,17 @@ DEALINGS IN THE SOFTWARE.
#include "core.h"
#include <stdexcept>
// In C++11, clang will warn about using dynamic exception specifications
// as they are deprecated. But as this class is subclassing std::exception
// we must keep the 'throw()' to be C++98 compatible.
// 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
namespace vtk_utf8
{
// Exceptions that may be thrown from the library functions.
......@@ -313,6 +324,13 @@ namespace vtk_utf8
} // namespace vtk_utf8
// Undo warning suppression.
#if defined(__clang__) && defined(__has_warning)
# if __has_warning("-Wdeprecated")
# pragma clang diagnostic pop
# endif
#endif
#endif //header guard
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment