BIND 10 master, updated. b47eafefecf38d32013bc7377aa4eebf531c49f6 [master] fix clang issue with exception in unnamed namespace
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Mar 13 15:54:46 UTC 2013
The branch, master has been updated
via b47eafefecf38d32013bc7377aa4eebf531c49f6 (commit)
from 50b124aea4fc6c367ee64acb81041384c169906e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b47eafefecf38d32013bc7377aa4eebf531c49f6
Author: Jelte Jansen <jelte at isc.org>
Date: Wed Mar 13 08:53:53 2013 -0700
[master] fix clang issue with exception in unnamed namespace
-----------------------------------------------------------------------
Summary of changes:
src/lib/util/encode/base_n.cc | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/util/encode/base_n.cc b/src/lib/util/encode/base_n.cc
index f5f930a..8c813c3 100644
--- a/src/lib/util/encode/base_n.cc
+++ b/src/lib/util/encode/base_n.cc
@@ -40,6 +40,15 @@ namespace isc {
namespace util {
namespace encode {
+// Some versions of clang cannot handle exceptions in unnamed namespaces
+// so this exception is defined in an 'internal' namespace
+namespace clang_unnamed_namespace_workaround {
+// An internally caught exception to unify a few possible cases of the same
+// error.
+class IncompleteBaseInput : public std::exception {
+};
+} // end namespace internal
+
// In the following anonymous namespace, we provide a generic framework
// to encode/decode baseN format. We use the following tools:
// - boost base64_from_binary/binary_from_base64: provide mapping table for
@@ -144,11 +153,6 @@ private:
bool in_pad_;
};
-// An internally caught exception to unify a few possible cases of the same
-// error.
-class IncompleteBaseInput : public std::exception {
-};
-
// DecodeNormalizer is an input iterator intended to be used as a filter
// between the encoded baseX stream and binary_from_baseXX.
// A DecodeNormalizer object is configured with three string iterators
@@ -217,7 +221,9 @@ public:
// but in that case we need to catch incomplete baseX input in
// a different way. It's done via char_count_ and after the
// completion of decoding.
- throw IncompleteBaseInput(); // throw this now and convert it
+
+ // throw this now and convert it
+ throw clang_unnamed_namespace_workaround::IncompleteBaseInput();
}
if (*base_ == BASE_PADDING_CHAR) {
// Padding can only happen at the end of the input string. We can
@@ -378,9 +384,10 @@ BaseNTransformer<BitsPerChunk, BaseZeroCode, Encoder, Decoder>::decode(
// a multiple of 8; otherwise the decoder reaches the end of input
// with some incomplete bits of data, which is invalid.
if (((char_count * BitsPerChunk) % 8) != 0) {
- throw IncompleteBaseInput(); // catch this immediately below
+ // catch this immediately below
+ throw clang_unnamed_namespace_workaround::IncompleteBaseInput();
}
- } catch (const IncompleteBaseInput&) {
+ } catch (const clang_unnamed_namespace_workaround::IncompleteBaseInput&) {
// we unify error handling for incomplete input here.
isc_throw(BadValue, "Incomplete input for " << algorithm
<< ": " << input);
More information about the bind10-changes
mailing list