diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Document.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 58f663376..c105bdda3 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -16,8 +16,16 @@ #include <vector> #include <algorithm> +#define NOEXCEPT + #ifndef NO_CXX11_REGEX #include <regex> +#if defined(__GLIBCXX__) +// If using the GNU implementation of <regex> then have 'noexcept' so can use +// when defining regex iterators to keep Clang analyze happy. +#undef NOEXCEPT +#define NOEXCEPT noexcept +#endif #endif #include "Platform.h" @@ -2570,7 +2578,7 @@ public: Position position; ByteIterator(const Document *doc_ = 0, Position position_ = 0) : doc(doc_), position(position_) { } - ByteIterator(const ByteIterator &other) { + ByteIterator(const ByteIterator &other) NOEXCEPT { doc = other.doc; position = other.position; } @@ -2745,7 +2753,7 @@ class UTF8Iterator : public std::iterator<std::bidirectional_iterator_tag, wchar public: UTF8Iterator(const Document *doc_=0, Position position_=0) : doc(doc_), position(position_) { } - UTF8Iterator(const UTF8Iterator &other) { + UTF8Iterator(const UTF8Iterator &other) NOEXCEPT { doc = other.doc; position = other.position; } |