You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bn...@apache.org on 2024/01/30 16:25:00 UTC

(trafficserver-libswoc) branch dev-1-2-0 created (now 8b3f952)

This is an automated email from the ASF dual-hosted git repository.

bneradt pushed a change to branch dev-1-2-0
in repository https://gitbox.apache.org/repos/asf/trafficserver-libswoc.git


      at 8b3f952  More style tweaks.

This branch includes the following new commits:

     new 1c86ec0  Update to 1.2.0
     new e484968  First pass - define for outer namespace.
     new 5df7c9d  Use nested inline namespace to version API.
     new 8b3f952  More style tweaks.

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(trafficserver-libswoc) 02/04: First pass - define for outer namespace.

Posted by bn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bneradt pushed a commit to branch dev-1-2-0
in repository https://gitbox.apache.org/repos/asf/trafficserver-libswoc.git

commit e4849683e72b94a9c38384bbae9e1142d9bb1afc
Author: Alan M. Carroll <am...@apache.org>
AuthorDate: Fri Apr 3 17:05:06 2020 -0500

    First pass - define for outer namespace.
---
 doc/code/BW_Format.en.rst              |  4 ++--
 doc/code/BufferWriter.en.rst           |  2 +-
 doc/code/IPSpace.en.rst                |  2 +-
 doc/code/MemArena.en.rst               |  2 +-
 doc/code/MemSpan.en.rst                |  2 +-
 doc/code/TextView.en.rst               |  2 +-
 example/ex_netdb.cc                    | 20 ++++++++++----------
 swoc++/include/swoc/ArenaWriter.h      | 10 +++++-----
 swoc++/include/swoc/BufferWriter.h     | 22 +++++-----------------
 swoc++/include/swoc/DiscreteRange.h    | 15 +++++++--------
 swoc++/include/swoc/Errata.h           | 27 +++++++--------------------
 swoc++/include/swoc/IntrusiveDList.h   | 23 ++++++-----------------
 swoc++/include/swoc/IntrusiveHashMap.h | 26 +++++++++-----------------
 swoc++/include/swoc/Lexicon.h          | 20 +++++---------------
 swoc++/include/swoc/MemArena.h         | 19 ++++---------------
 swoc++/include/swoc/MemSpan.h          | 23 +++++++----------------
 swoc++/include/swoc/RBTree.h           | 10 ++++++----
 swoc++/include/swoc/Scalar.h           | 22 +++++-----------------
 swoc++/include/swoc/TextView.h         | 23 ++++++-----------------
 swoc++/include/swoc/bwf_base.h         | 24 ++++++------------------
 swoc++/include/swoc/bwf_ex.h           | 27 ++++++---------------------
 swoc++/include/swoc/bwf_fwd.h          | 23 ++++++-----------------
 swoc++/include/swoc/bwf_ip.h           | 25 +++++++------------------
 swoc++/include/swoc/bwf_std.h          | 22 ++++------------------
 swoc++/include/swoc/ext/HashFNV.h      |  4 ++--
 swoc++/include/swoc/swoc_file.h        | 22 +++++-----------------
 swoc++/include/swoc/swoc_ip.h          | 16 +++++++++-------
 swoc++/include/swoc/swoc_meta.h        | 23 ++++++-----------------
 swoc++/include/swoc/swoc_version.h     | 28 ++++++++++------------------
 swoc++/include/swoc/version_notes.txt  |  5 -----
 swoc++/src/ArenaWriter.cc              |  9 ++++-----
 swoc++/src/Errata.cc                   | 21 +++++----------------
 swoc++/src/MemArena.cc                 | 19 +++----------------
 swoc++/src/RBTree.cc                   | 20 ++++----------------
 swoc++/src/TextView.cc                 | 17 ++---------------
 swoc++/src/bw_format.cc                |  6 +++---
 swoc++/src/bw_ip_format.cc             |  6 +++---
 swoc++/src/swoc_file.cc                |  8 +++++---
 swoc++/src/swoc_ip.cc                  | 25 ++++++-------------------
 tools/ats-revert.sh                    |  2 +-
 tools/rewrite.sh                       |  4 ++--
 tools/update-version.sh                |  1 +
 unit_tests/ex_MemArena.cc              |  2 +-
 unit_tests/ex_TextView.cc              |  6 +++---
 unit_tests/ex_ipspace_properties.cc    | 10 +++++-----
 unit_tests/test_Lexicon.cc             | 17 ++---------------
 unit_tests/test_TextView.cc            |  2 +-
 unit_tests/test_bw_format.cc           | 20 +++-----------------
 unit_tests/test_ip.cc                  | 13 ++++++-------
 unit_tests/test_meta.cc                |  2 +-
 50 files changed, 211 insertions(+), 492 deletions(-)

diff --git a/doc/code/BW_Format.en.rst b/doc/code/BW_Format.en.rst
index 712da59..1f7bbf0 100644
--- a/doc/code/BW_Format.en.rst
+++ b/doc/code/BW_Format.en.rst
@@ -26,7 +26,7 @@ BufferWriter Formatting
 Synopsis
 ********
 
-:code:`#include <swoc/bwf_base.h>`
+:code:`#include "swoc/bwf_base.h"`
 
 Formatted output was added to :class:`BufferWriter` for several reasons.
 
@@ -486,7 +486,7 @@ Specific types
 .. _ip_addr_fmt:
 
 :code:`sockaddr const *`
-   :code:`#include <swoc/bwf_ip.h>`
+   :code:`#include "swoc/bwf_ip.h"`
 
    The IP address is printed. Fill is used to fill in address segments if provided, not to the
    minimum width if specified. :libswoc:`IPEndpoint` and :libswoc:`IPAddr` are supported with the
diff --git a/doc/code/BufferWriter.en.rst b/doc/code/BufferWriter.en.rst
index c03f1fa..161dd39 100644
--- a/doc/code/BufferWriter.en.rst
+++ b/doc/code/BufferWriter.en.rst
@@ -25,7 +25,7 @@ BufferWriter
 Synopsis
 ********
 
-:code:`#include <swoc/BufferWriter.h>`
+:code:`#include "swoc/BufferWriter.h"`
 
 .. class:: BufferWriter
 
diff --git a/doc/code/IPSpace.en.rst b/doc/code/IPSpace.en.rst
index 0edab18..a8890c8 100644
--- a/doc/code/IPSpace.en.rst
+++ b/doc/code/IPSpace.en.rst
@@ -12,7 +12,7 @@ IP Networking
 Synopsis
 ********
 
-:code:`#include <swoc/swoc_ip.h>`
+:code:`#include "swoc/swoc_ip.h"`
 
 Usage
 *****
diff --git a/doc/code/MemArena.en.rst b/doc/code/MemArena.en.rst
index 43dac4f..bd033aa 100644
--- a/doc/code/MemArena.en.rst
+++ b/doc/code/MemArena.en.rst
@@ -25,7 +25,7 @@ MemArena
 Synopsis
 ********
 
-:code:`#include <swoc/MemArena.h>`
+:code:`#include "swoc/MemArena.h"`
 
 .. class:: template < typename T > MemArena
 
diff --git a/doc/code/MemSpan.en.rst b/doc/code/MemSpan.en.rst
index 2eb1ab2..7ff0428 100644
--- a/doc/code/MemSpan.en.rst
+++ b/doc/code/MemSpan.en.rst
@@ -25,7 +25,7 @@ MemSpan
 Synopsis
 ********
 
-:code:`#include <swoc/MemSpan.h>`
+:code:`#include "swoc/MemSpan.h"`
 
 .. class:: template < typename T > MemSpan
 
diff --git a/doc/code/TextView.en.rst b/doc/code/TextView.en.rst
index df2bb94..fd46f5c 100644
--- a/doc/code/TextView.en.rst
+++ b/doc/code/TextView.en.rst
@@ -27,7 +27,7 @@ TextView
 Synopsis
 ********
 
-:code:`#include <swoc/TextView.h>`
+:code:`#include "swoc/TextView.h"`
 
 .. class:: TextView
 
diff --git a/example/ex_netdb.cc b/example/ex_netdb.cc
index 211a72c..2f36cf4 100644
--- a/example/ex_netdb.cc
+++ b/example/ex_netdb.cc
@@ -31,16 +31,16 @@
 #include <unordered_set>
 #include <fstream>
 
-#include <swoc/TextView.h>
-#include <swoc/swoc_ip.h>
-#include <swoc/bwf_ip.h>
-#include <swoc/bwf_std.h>
-#include <swoc/bwf_ex.h>
-#include <swoc/swoc_file.h>
-#include <swoc/Lexicon.h>
+#include "swoc/TextView.h"
+#include "swoc/swoc_ip.h"
+#include "swoc/bwf_ip.h"
+#include "swoc/bwf_std.h"
+#include "swoc/bwf_ex.h"
+#include "swoc/swoc_file.h"
+#include "swoc/Lexicon.h"
 
 using namespace std::literals;
-using namespace swoc::literals;
+using namespace SWOC_NAMESPACE::literals;
 
 using swoc::TextView;
 using swoc::IPEndpoint;
@@ -100,7 +100,7 @@ swoc::Lexicon<PodType> PodTypeNames {{
                                }};
 
 // Create BW formatters for the types so they can be used for output.
-namespace swoc {
+namespace SWOC_NAMESPACE {
 
 BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, PodType pt) {
   return w.write(PodTypeNames[pt]);
@@ -121,7 +121,7 @@ BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, FlagSet const& fl
   return w;
 }
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
 
 // These are used to keep pointers for the same string identical so the payloads
 // can be directly compared.
diff --git a/swoc++/include/swoc/ArenaWriter.h b/swoc++/include/swoc/ArenaWriter.h
index a09c573..02e3cd7 100644
--- a/swoc++/include/swoc/ArenaWriter.h
+++ b/swoc++/include/swoc/ArenaWriter.h
@@ -1,16 +1,16 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Verizon Media 2020
 /** @file
  * @c BufferWriter for a @c MemArena.
- *
- * Copyright 2019, Oath Inc.
- * SPDX-License-Identifier: Apache-2.0
  */
 #pragma once
 
+#include "swoc/swoc_version.h"
 #include "swoc/MemSpan.h"
 #include "swoc/bwf_base.h"
 #include "swoc/MemArena.h"
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 /** Buffer writer for a @c MemArena.
  *
@@ -61,4 +61,4 @@ protected:
 
 inline swoc::ArenaWriter::ArenaWriter(swoc::MemArena &arena) : super_type(arena.remnant()), _arena(arena) {}
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/BufferWriter.h b/swoc++/include/swoc/BufferWriter.h
index 6880120..27987af 100644
--- a/swoc++/include/swoc/BufferWriter.h
+++ b/swoc++/include/swoc/BufferWriter.h
@@ -1,21 +1,8 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Apache Software Foundation 2019
 /** @file
 
     Utilities for generating character sequences in buffers.
-
-    @section license License
-
-    Licensed to the Apache Software Foundation (ASF) under one or more contributor license
-    agreements.  See the NOTICE file distributed with this work for additional information regarding
-    copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with the License.  You may
-    obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software distributed under the
-    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-    express or implied. See the License for the specific language governing permissions and
-    limitations under the License.
  */
 
 #pragma once
@@ -28,10 +15,11 @@
 #include <iosfwd>
 #include <string_view>
 
+#include "swoc/swoc_version.h"
 #include "swoc/TextView.h"
 #include "swoc/MemSpan.h"
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 namespace bwf
 {
@@ -634,7 +622,7 @@ inline FixedBufferWriter::operator std::string_view() const {
 // --- LocalBufferWriter ---
 template <size_t N> LocalBufferWriter<N>::LocalBufferWriter() : super_type(_arr, N) {}
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
 
 namespace std
 {
diff --git a/swoc++/include/swoc/DiscreteRange.h b/swoc++/include/swoc/DiscreteRange.h
index 4ab78fb..0c988bf 100644
--- a/swoc++/include/swoc/DiscreteRange.h
+++ b/swoc++/include/swoc/DiscreteRange.h
@@ -1,8 +1,5 @@
-#pragma once
-
 // SPDX-License-Identifier: Apache-2.0
 // Copyright 2014 Network Geographics
-
 /** @file
     Support classes for creating intervals of numeric values.
 
@@ -10,14 +7,16 @@
     used as a base class if additional functionality is required.
  */
 
+#pragma once
 #include <limits>
 #include <functional>
 
-#include <swoc/swoc_meta.h>
-#include <swoc/RBTree.h>
-#include <swoc/MemArena.h>
+#include "swoc/swoc_version.h"
+#include "swoc/swoc_meta.h"
+#include "swoc/RBTree.h"
+#include "swoc/MemArena.h"
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 /// Internal implementation namespace.
 namespace detail
@@ -1394,4 +1393,4 @@ DiscreteSpace<METRIC, PAYLOAD>::blend(DiscreteSpace::range_type const&range, U c
   return *this;
 }
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/Errata.h b/swoc++/include/swoc/Errata.h
index f352e8b..ccaea5c 100644
--- a/swoc++/include/swoc/Errata.h
+++ b/swoc++/include/swoc/Errata.h
@@ -1,5 +1,6 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Network Geographics 2014
 /** @file
- *
     Stacking error message handling.
 
     The problem addressed by this library is the ability to pass back detailed error messages from
@@ -32,25 +33,11 @@
     acts on an erratum when it becomes unreferenced. The intended use is to send the messages to an
     output log. This makes reporting errors to a log from even deeply nested functions easy while
     preserving the ability of the top level logic to control such logging.
-
-    @section license License
-
-    Licensed to the Apache Software Foundation (ASF) under one or more contributor license
-    agreements.  See the NOTICE file distributed with this work for additional information regarding
-    copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with the License.  You may
-    obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software distributed under the
-    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-    express or implied. See the License for the specific language governing permissions and
-    limitations under the License.
  */
 
 #pragma once
 
+#include "swoc/swoc_version.h"
 #include <vector>
 #include <string_view>
 #include <functional>
@@ -59,7 +46,7 @@
 #include "swoc/bwf_base.h"
 #include "swoc/IntrusiveDList.h"
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 /// Severity levels for Errata.
 enum class Severity : uint8_t {
@@ -873,7 +860,7 @@ BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, Errata::Annotatio
 
 BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, Errata const &);
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
 
 // Tuple / structured binding support.
 namespace std
@@ -894,7 +881,7 @@ template <typename R> class tuple_size<swoc::Rv<R>> : public std::integral_const
 
 } // namespace std
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 // Not sure how much of this is needed, but experimentally all of these were needed in one
 // use case or another of structured binding. I wasn't able to make this work if this was
@@ -932,4 +919,4 @@ get(swoc::Rv<R> const &rv) {
   }
 }
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/IntrusiveDList.h b/swoc++/include/swoc/IntrusiveDList.h
index f91079c..7487057 100644
--- a/swoc++/include/swoc/IntrusiveDList.h
+++ b/swoc++/include/swoc/IntrusiveDList.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Apach Software Foundation 2019
 /** @file
 
     Intrusive double linked list container.
@@ -8,28 +10,15 @@
     @note This is a header only library.
 */
 
-/*  Licensed to the Apache Software Foundation (ASF) under one or more contributor license
-    agreements.  See the NOTICE file distributed with this work for additional information regarding
-    copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with the License.  You may
-    obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software distributed under the
-    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-    express or implied. See the License for the specific language governing permissions and
-    limitations under the License.
-
- */
-
 #pragma once
 
 /// Clang doesn't like just declaring the tag struct we need so we have to include the file.
 #include <iterator>
 #include <type_traits>
 
-namespace swoc
+#include "swoc/swoc_version.h"
+
+namespace SWOC_NAMESPACE
 {
 /** Intrusive doubly linked list container.
 
@@ -924,4 +913,4 @@ IntrusiveDList<L>::apply(F &&f) -> self_type & {
   return detail::Intrusive_DList_Apply(*this, f);
 };
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/IntrusiveHashMap.h b/swoc++/include/swoc/IntrusiveHashMap.h
index 7a3204d..bed2d21 100644
--- a/swoc++/include/swoc/IntrusiveHashMap.h
+++ b/swoc++/include/swoc/IntrusiveHashMap.h
@@ -1,21 +1,11 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Apache Software Foundation 2019
 /** @file
 
-  Instrusive hash map.
+  Intrusive hash map.
 
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
-  See the NOTICE file distributed with this work for additional information regarding copyright
-  ownership.  The ASF licenses this file to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance with the License.  You may obtain a
-  copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software distributed under the License
-  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-  or implied. See the License for the specific language governing permissions and limitations under
-  the License.
+  A hash map that depends on support in the hashed objects. Useful for sharing objects between
+  hash maps with different keys / hashes.
 */
 
 #pragma once
@@ -23,9 +13,11 @@
 #include <vector>
 #include <array>
 #include <algorithm>
+
+#include "swoc/swoc_version.h"
 #include "swoc/IntrusiveDList.h"
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 /** Intrusive Hash Table.
 
@@ -710,4 +702,4 @@ IntrusiveHashMap<H>::get_expansion_limit() const {
   return _expansion_limit;
 }
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/Lexicon.h b/swoc++/include/swoc/Lexicon.h
index 2ee2cf7..f815d2d 100644
--- a/swoc++/include/swoc/Lexicon.h
+++ b/swoc++/include/swoc/Lexicon.h
@@ -1,19 +1,8 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Network Geographics 2014
 /** @file
 
     Assistant class for translating strings to and from enumeration values.
-
-    Licensed to the Apache Software Foundation (ASF) under one or more contributor license
-    agreements.  See the NOTICE file distributed with this work for additional information regarding
-    copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with the License.  You may
-    obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software distributed under the
-    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-    express or implied. See the License for the specific language governing permissions and
-    limitations under the License.
  */
 
 #pragma once
@@ -25,12 +14,13 @@
 #include <array>
 #include <variant>
 
+#include "swoc/swoc_version.h"
 #include "swoc/IntrusiveHashMap.h"
 #include "swoc/MemArena.h"
 #include "swoc/bwf_base.h"
 #include "swoc/ext/HashFNV.h"
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 namespace detail
 {
@@ -664,4 +654,4 @@ Lexicon<E>::const_iterator::operator--(int) -> self_type {
   return tmp;
 }
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/MemArena.h b/swoc++/include/swoc/MemArena.h
index 3fb8caf..b15a347 100644
--- a/swoc++/include/swoc/MemArena.h
+++ b/swoc++/include/swoc/MemArena.h
@@ -1,19 +1,8 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Verizon Media 2020
 /** @file
 
     Memory arena for allocations
-
-    Licensed to the Apache Software Foundation (ASF) under one or more contributor license
-    agreements.  See the NOTICE file distributed with this work for additional information regarding
-    copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in com1pliance with the License.  You may
-    obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software distributed under the
-    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-    express or implied. See the License for the specific language governing permissions and
-    limitations under the License.
  */
 
 #pragma once
@@ -28,7 +17,7 @@
 #include "swoc/Scalar.h"
 #include "swoc/IntrusiveDList.h"
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 /** A memory arena.
 
@@ -496,4 +485,4 @@ void FixedArena<T>::clear() {
   _list._next = nullptr;
 }
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/MemSpan.h b/swoc++/include/swoc/MemSpan.h
index f341311..48f2869 100644
--- a/swoc++/include/swoc/MemSpan.h
+++ b/swoc++/include/swoc/MemSpan.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Verizon Media 2020
 /** @file
 
    Spans of writable memory. This is similar but independently developed from @c std::span. The goal
@@ -5,21 +7,8 @@
    arbitrary types via template methods.
 */
 
-/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
-   agreements.  See the NOTICE file distributed with this work for additional information regarding
-   copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with the License.  You may obtain
-   a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software distributed under the License
-   is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-   or implied. See the License for the specific language governing permissions and limitations under
-   the License.
- */
-
 #pragma once
+
 #include <cstring>
 #include <iosfwd>
 #include <iostream>
@@ -30,7 +19,9 @@
 #include <tuple>
 #include <exception>
 
-namespace swoc
+#include "swoc/swoc_version.h"
+
+namespace SWOC_NAMESPACE
 {
 /** A span of contiguous piece of memory.
 
@@ -925,7 +916,7 @@ MemSpan<void>::view() const {
   return {static_cast<char const *>(_ptr), _size};
 }
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
 
 /// @cond NO_DOXYGEN
 // STL tuple support - this allows the @c MemSpan to be used as a tuple of a pointer
diff --git a/swoc++/include/swoc/RBTree.h b/swoc++/include/swoc/RBTree.h
index 8e08b77..a6005dd 100644
--- a/swoc++/include/swoc/RBTree.h
+++ b/swoc++/include/swoc/RBTree.h
@@ -1,13 +1,15 @@
-#pragma once
 // SPDX-License-Identifier: Apache-2.0
+// Copyright Apache Software Foundation 2019
 /** @file
 
    Red/Black tree.
 */
 
-#include <swoc/IntrusiveDList.h>
+#pragma once
+#include "swoc/swoc_version.h"
+#include "swoc/IntrusiveDList.h"
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 namespace detail
 {
@@ -225,4 +227,4 @@ namespace detail
 
 } // namespace detail
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/Scalar.h b/swoc++/include/swoc/Scalar.h
index ac6b028..b58a65d 100644
--- a/swoc++/include/swoc/Scalar.h
+++ b/swoc++/include/swoc/Scalar.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Apache Software Foundation 2019
 /** @file
 
   Scaled integral values.
@@ -6,21 +8,6 @@
   enables this to be done in a type and scaling safe manner where the defined factors carry their scaling
   information as part of the type.
 */
-
-/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
-   See the NOTICE file distributed with this work for additional information regarding copyright
-   ownership.  The ASF licenses this file to you under the Apache License, Version 2.0 (the
-   "License"); you may not use this file except in compliance with the License.  You may obtain a
-   copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software distributed under the License
-   is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-   or implied. See the License for the specific language governing permissions and limitations under
-   the License.
- */
-
 #pragma once
 
 #include <cstdint>
@@ -28,6 +15,7 @@
 #include <ostream>
 #include <type_traits>
 
+#include "swoc/swoc_version.h"
 #include "swoc/swoc_meta.h"
 
 namespace tag
@@ -36,7 +24,7 @@ namespace tag
 struct generic;
 } // namespace tag
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 template <intmax_t N, typename C, typename T> class Scalar;
 
@@ -945,7 +933,7 @@ namespace detail
     return w;
   }
 } // namespace detail
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
 
 namespace std
 {
diff --git a/swoc++/include/swoc/TextView.h b/swoc++/include/swoc/TextView.h
index db20a21..e53a198 100644
--- a/swoc++/include/swoc/TextView.h
+++ b/swoc++/include/swoc/TextView.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Apache Software Foundation 2019
 /** @file
 
    Class for handling "views" of text. Views presume the memory for the buffer is managed
@@ -9,21 +11,6 @@
    class.
 */
 
-/*
-   Licensed to the Apache Software Foundation (ASF) under one or more contributor license
-   agreements.  See the NOTICE file distributed with this work for additional information regarding
-   copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with the License.  You may obtain
-   a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software distributed under the License
-   is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-   or implied. See the License for the specific language governing permissions and limitations under
-   the License.
- */
-
 #pragma once
 #include <bitset>
 #include <iosfwd>
@@ -31,6 +18,8 @@
 #include <string>
 #include <string_view>
 
+#include "swoc/swoc_version.h"
+
 /** Compare views with ordering, ignoring case.
  *
  * @param lhs input view
@@ -82,7 +71,7 @@ strcmp(const std::string_view &lhs, const std::string_view &rhs) {
   return memcmp(lhs, rhs);
 }
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 class TextView;
 
@@ -1655,7 +1644,7 @@ namespace literals
   constexpr swoc::TextView operator"" _tv(const char *s, size_t n) { return {s, n}; }
 } // namespace literals
 
-}; // namespace swoc
+}; // namespace SWOC_NAMESPACE
 
 namespace std
 {
diff --git a/swoc++/include/swoc/bwf_base.h b/swoc++/include/swoc/bwf_base.h
index ad732fe..fb093c7 100644
--- a/swoc++/include/swoc/bwf_base.h
+++ b/swoc++/include/swoc/bwf_base.h
@@ -1,21 +1,8 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Apache Software Foundation 2019
 /** @file
 
     Basic formatting support for @c BufferWriter.
-
-    @section license License
-
-    Licensed to the Apache Software Foundation (ASF) under one or more contributor license
-    agreements.  See the NOTICE file distributed with this work for additional information regarding
-    copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with the License.  You may
-    obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software distributed under the
-    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-    express or implied. See the License for the specific language governing permissions and
-    limitations under the License.
  */
 
 #pragma once
@@ -32,13 +19,14 @@
 #include <tuple>
 #include <any>
 
+#include "swoc/swoc_version.h"
 #include "swoc/TextView.h"
 #include "swoc/MemSpan.h"
 #include "swoc/MemArena.h"
 #include "swoc/BufferWriter.h"
 #include "swoc/swoc_meta.h"
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 namespace bwf
 {
@@ -958,7 +946,7 @@ BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, std::string_view
 inline BufferWriter &
 bwformat(BufferWriter &w, bwf::Spec const &spec, const void *ptr)
 {
-  using namespace swoc::literals;
+  using namespace SWOC_NAMESPACE::literals;
   bwf::Spec ptr_spec{spec};
   ptr_spec._radix_lead_p = true;
 
@@ -1274,4 +1262,4 @@ namespace bwf
 
 BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, bwf::HexDump const &hex);
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/bwf_ex.h b/swoc++/include/swoc/bwf_ex.h
index 1638a1d..5e8a280 100644
--- a/swoc++/include/swoc/bwf_ex.h
+++ b/swoc++/include/swoc/bwf_ex.h
@@ -1,24 +1,8 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Apache Software Foundation 2019
 /** @file
 
     BufferWriter formatters for types in the std namespace.
-
-    @section license License
-
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
  */
 
 #pragma once
@@ -26,14 +10,15 @@
 #include <array>
 #include <string_view>
 
+#include "swoc/swoc_version.h"
 #include "swoc/bwf_base.h"
 #include "swoc/swoc_meta.h"
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 namespace bwf
 {
-  using namespace swoc::literals; // enable ""sv
+  using namespace SWOC_NAMESPACE::literals; // enable ""sv
 
   /** Output @a text @a n times.
    *
@@ -223,4 +208,4 @@ bwformat(BufferWriter &w, bwf::Spec const &spec, bwf::SubText<Args...> const &su
   return w;
 }
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/bwf_fwd.h b/swoc++/include/swoc/bwf_fwd.h
index 4d90262..944da3e 100644
--- a/swoc++/include/swoc/bwf_fwd.h
+++ b/swoc++/include/swoc/bwf_fwd.h
@@ -1,26 +1,15 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Apache Software Foundation 2019
 /** @file
 
     Forward declarations for BufferWriter formatting.
-
-    @section license License
-
-    Licensed to the Apache Software Foundation (ASF) under one or more contributor license
-    agreements.  See the NOTICE file distributed with this work for additional information regarding
-    copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with the License.  You may
-    obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software distributed under the
-    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-    express or implied. See the License for the specific language governing permissions and
-    limitations under the License.
  */
 
 #pragma once
 
-namespace swoc
+#include "swoc/swoc_version.h"
+
+namespace SWOC_NAMESPACE
 {
 class BufferWriter;
 class FixedBufferWriter;
@@ -31,4 +20,4 @@ namespace bwf
   struct Spec;
   class Format;
 } // namespace bwf
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/bwf_ip.h b/swoc++/include/swoc/bwf_ip.h
index 63906d8..9c92530 100644
--- a/swoc++/include/swoc/bwf_ip.h
+++ b/swoc++/include/swoc/bwf_ip.h
@@ -1,31 +1,20 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Apache Software Foundation 2019
 /** @file
 
     BufferWriter formatting for IP addresses.
-
-    @section license License
-
-    Licensed to the Apache Software Foundation (ASF) under one or more contributor license
-    agreements.  See the NOTICE file distributed with this work for additional information regarding
-    copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with the License.  You may
-    obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software distributed under the
-    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-    express or implied. See the License for the specific language governing permissions and
-    limitations under the License.
  */
 
 #pragma once
 
 #include <iosfwd>
+#include <netinet/in.h>
+
+#include "swoc/swoc_version.h"
 #include "swoc/bwf_base.h"
 #include "swoc/swoc_ip.h"
-#include <netinet/in.h>
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 // All of these expect the address to be in network order.
 BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, sockaddr const *addr);
@@ -47,7 +36,7 @@ bwformat(BufferWriter &w, bwf::Spec const &spec, IPEndpoint const &addr) {
 /// Buffer space sufficient for printing any basic IP address type.
 static const size_t IP_STREAM_SIZE = 80;
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
 
 namespace std {
 inline ostream &
diff --git a/swoc++/include/swoc/bwf_std.h b/swoc++/include/swoc/bwf_std.h
index 2b200f7..536b9d8 100644
--- a/swoc++/include/swoc/bwf_std.h
+++ b/swoc++/include/swoc/bwf_std.h
@@ -1,24 +1,8 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Apache Software Foundation 2019
 /** @file
 
     BufferWriter formatters for types in the std namespace.
-
-    @section license License
-
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
  */
 
 #pragma once
@@ -26,6 +10,8 @@
 #include <atomic>
 #include <chrono>
 #include <bitset>
+
+#include "swoc/swoc_version.h"
 #include "swoc/bwf_base.h"
 
 namespace std
diff --git a/swoc++/include/swoc/ext/HashFNV.h b/swoc++/include/swoc/ext/HashFNV.h
index 407b036..a495efc 100644
--- a/swoc++/include/swoc/ext/HashFNV.h
+++ b/swoc++/include/swoc/ext/HashFNV.h
@@ -27,7 +27,7 @@
 #include <cstdint>
 #include "swoc/TextView.h"
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 struct Hash32FNV1a {
 protected:
@@ -190,4 +190,4 @@ Hash64FNV1a::hash_immediate(std::string_view const &data) -> value_type
   return this->update(data).final().get();
 }
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/swoc_file.h b/swoc++/include/swoc/swoc_file.h
index e02c369..253303c 100644
--- a/swoc++/include/swoc/swoc_file.h
+++ b/swoc++/include/swoc/swoc_file.h
@@ -1,21 +1,8 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Apache Software Foundation 2019
 /** @file
 
   Simple path and file utilities.
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
-  See the NOTICE file distributed with this work for additional information regarding copyright
-  ownership.  The ASF licenses this file to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance with the License.  You may obtain a
-  copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software distributed under the License
-  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-  or implied. See the License for the specific language governing permissions and limitations under
-  the License.
  */
 
 #pragma once
@@ -26,9 +13,10 @@
 #include <string_view>
 #include <system_error>
 
+#include "swoc/swoc_version.h"
 #include "swoc/TextView.h"
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 namespace file
 {
@@ -242,4 +230,4 @@ namespace bwf
 }
 
 BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, file::path const &p);
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/swoc_ip.h b/swoc++/include/swoc/swoc_ip.h
index 599b36b..a9c7469 100644
--- a/swoc++/include/swoc/swoc_ip.h
+++ b/swoc++/include/swoc/swoc_ip.h
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: Apache-2.0
+// Copyright Network Geographics 2014
 /** @file
    IP address and network related classes.
  */
@@ -8,12 +9,13 @@
 #include <string_view>
 #include <variant>
 
-#include <swoc/TextView.h>
-#include <swoc/DiscreteRange.h>
-#include <swoc/RBTree.h>
+#include "swoc/swoc_version.h"
+#include "swoc/TextView.h"
+#include "swoc/DiscreteRange.h"
+#include "swoc/RBTree.h"
 #include <values.h>
 
-namespace swoc {
+namespace SWOC_NAMESPACE {
 
 class IP4Addr;
 class IP6Addr;
@@ -2686,7 +2688,7 @@ auto IPSpace<PAYLOAD>::end() const -> const_iterator {
   return const_iterator(nc_this->_ip4.end(), nc_this->_ip6.end());
 }
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
 
 namespace std {
 
@@ -2746,7 +2748,7 @@ public:
 
 } // namespace std
 
-namespace swoc {
+namespace SWOC_NAMESPACE {
 
 template<size_t IDX> typename std::tuple_element<IDX, IP4Net>::type
 get(swoc::IP4Net const& net) {
@@ -2775,4 +2777,4 @@ get(swoc::IPNet const& net) {
   }
 }
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/swoc_meta.h b/swoc++/include/swoc/swoc_meta.h
index 852a7e0..cfbdd05 100644
--- a/swoc++/include/swoc/swoc_meta.h
+++ b/swoc++/include/swoc/swoc_meta.h
@@ -1,28 +1,17 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Verizon Media 2020
 /** @file
 
   Meta programming support utilities.
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
-  See the NOTICE file distributed with this work for additional information regarding copyright
-  ownership.  The ASF licenses this file to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance with the License.  You may obtain a
-  copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software distributed under the License
-  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-  or implied. See the License for the specific language governing permissions and limitations under
-  the License.
 */
 
 #pragma once
 
 #include <type_traits>
 
-namespace swoc
+#include "swoc/swoc_version.h"
+
+namespace SWOC_NAMESPACE
 {
 namespace meta
 {
@@ -200,4 +189,4 @@ namespace meta
   };
 
 } // namespace meta
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/swoc_version.h b/swoc++/include/swoc/swoc_version.h
index 94716c3..03a87ea 100644
--- a/swoc++/include/swoc/swoc_version.h
+++ b/swoc++/include/swoc/swoc_version.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Verizon Media 2020
 /** @file
 
     Solid Wall of C++ Library
@@ -15,29 +17,19 @@
       with the ability to extend the formatting to arbitrary types, bind names
       in to the formatting context, and substitute alternate parsers for
       custom format styles.
-
-    @section license License
-
-    Licensed to the Apache Software Foundation (ASF) under one or more contributor license
-    agreements.  See the NOTICE file distributed with this work for additional information regarding
-    copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with the License.  You may
-    obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software distributed under the
-    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-    express or implied. See the License for the specific language governing permissions and
-    limitations under the License.
-
  */
 
 #pragma once
 
-namespace swoc
+#if !defined(SWOC_NAMESPACE)
+#  define SWOC_NAMESPACE swoc_1_2_0
+#endif
+
+namespace SWOC_NAMESPACE
 {
 static constexpr unsigned MAJOR_VERSION = 1;
 static constexpr unsigned MINOR_VERSION = 2;
 static constexpr unsigned POINT_VERSION = 0;
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
+
+namespace swoc = SWOC_NAMESPACE;
diff --git a/swoc++/include/swoc/version_notes.txt b/swoc++/include/swoc/version_notes.txt
deleted file mode 100644
index 6f81fd0..0000000
--- a/swoc++/include/swoc/version_notes.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-Places to update version: (should script this some day).
-swoc++/include/swoc/swoc_version.h
-doc/conf.py
-doc/Doxyfile
-swoc++/swoc++.part
diff --git a/swoc++/src/ArenaWriter.cc b/swoc++/src/ArenaWriter.cc
index a36387e..e94cd21 100644
--- a/swoc++/src/ArenaWriter.cc
+++ b/swoc++/src/ArenaWriter.cc
@@ -1,13 +1,12 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Verizon Media 2020
 /** @file
  * @c BufferWriter for a @c MemArena.
- *
- * Copyright 2019, Oath Inc.
- * SPDX-License-Identifier: Apache-2.0
  */
 
 #include "swoc/ArenaWriter.h"
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 ArenaWriter &
 ArenaWriter::write(char c)
@@ -49,4 +48,4 @@ ArenaWriter::realloc(size_t n)
   memcpy(_buffer, text.data(), text.size());
 }
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/src/Errata.cc b/swoc++/src/Errata.cc
index 7c8220c..2bf2660 100644
--- a/swoc++/src/Errata.cc
+++ b/swoc++/src/Errata.cc
@@ -1,19 +1,8 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Network Geographics 2014
 /** @file
 
     Errata implementation.
-
-    Licensed to the Apache Software Foundation (ASF) under one or more contributor license
-    agreements.  See the NOTICE file distributed with this work for additional information regarding
-    copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with the License.  You may
-    obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software distributed under the
-    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-    express or implied. See the License for the specific language governing permissions and
-    limitations under the License.
  */
 
 #include <iostream>
@@ -26,9 +15,9 @@
 using swoc::MemArena;
 using std::string_view;
 using namespace std::literals;
-using namespace swoc::literals;
+using namespace SWOC_NAMESPACE::literals;
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 /** List of sinks for abandoned erratum.
  */
@@ -217,4 +206,4 @@ operator<<(std::ostream &os, Errata const &err)
   return err.write(os);
 }
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/src/MemArena.cc b/swoc++/src/MemArena.cc
index 4e42ca6..1e16763 100644
--- a/swoc++/src/MemArena.cc
+++ b/swoc++/src/MemArena.cc
@@ -1,27 +1,14 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Verizon Media 2020
 /** @file
 
     MemArena memory allocator. Chunks of memory are allocated, frozen into generations and thawed
     away when unused.
  */
-
-/*  Licensed to the Apache Software Foundation (ASF) under one or more contributor license
-    agreements.  See the NOTICE file distributed with this work for additional information regarding
-    copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with the License.  You may
-    obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software distributed under the
-    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-    express or implied. See the License for the specific language governing permissions and
-    limitations under the License.
- */
-
 #include <algorithm>
 #include "swoc/MemArena.h"
 
-using namespace swoc;
+using namespace SWOC_NAMESPACE;
 
 void
 MemArena::Block::operator delete(void *ptr)
diff --git a/swoc++/src/RBTree.cc b/swoc++/src/RBTree.cc
index fab84c1..7e96486 100644
--- a/swoc++/src/RBTree.cc
+++ b/swoc++/src/RBTree.cc
@@ -1,25 +1,13 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Apache Software Foundation 2019
 /** @file
 
    Red/Black tree implementation.
 */
 
-/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
-   See the NOTICE file distributed with this work for additional information regarding copyright
-   ownership.  The ASF licenses this file to you under the Apache License, Version 2.0 (the
-   "License"); you may not use this file except in compliance with the License.  You may obtain a
-   copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software distributed under the License
-   is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-   or implied. See the License for the specific language governing permissions and limitations under
-   the License.
- */
-
 #include "swoc/RBTree.h"
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 namespace detail
 {
@@ -374,4 +362,4 @@ namespace detail
   }
 
 } // namespace detail
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/src/TextView.cc b/swoc++/src/TextView.cc
index f96df5b..6459712 100644
--- a/swoc++/src/TextView.cc
+++ b/swoc++/src/TextView.cc
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Apache Software Foundation 2019
 /** @file
 
     Class for handling "views" of a buffer. Views presume the memory for the
@@ -7,21 +9,6 @@
     better string parsing, particularly token based parsing.
 */
 
-/*  Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with this
-    work for additional information regarding copyright ownership.  The ASF
-    licenses this file to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-    License for the specific language governing permissions and limitations under
-    the License.
-*/
 #include "swoc/TextView.h"
 #include <cctype>
 #include <sstream>
diff --git a/swoc++/src/bw_format.cc b/swoc++/src/bw_format.cc
index d82fbde..7036075 100644
--- a/swoc++/src/bw_format.cc
+++ b/swoc++/src/bw_format.cc
@@ -32,12 +32,12 @@
 #include "swoc/swoc_meta.h"
 
 using namespace std::literals;
-using namespace swoc::literals;
+using namespace SWOC_NAMESPACE::literals;
 
 swoc::bwf::ExternalNames swoc::bwf::Global_Names;
 using swoc::svto_radix;
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 namespace bwf
 {
@@ -990,7 +990,7 @@ namespace
 {
 } // namespace
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
 
 namespace std
 {
diff --git a/swoc++/src/bw_ip_format.cc b/swoc++/src/bw_ip_format.cc
index 8c8ecdc..4355d8a 100644
--- a/swoc++/src/bw_ip_format.cc
+++ b/swoc++/src/bw_ip_format.cc
@@ -21,9 +21,9 @@
 #include "swoc/swoc_ip.h"
 #include "swoc/bwf_ip.h"
 
-using namespace swoc::literals;
+using namespace SWOC_NAMESPACE::literals;
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 using bwf::Spec;
 
@@ -304,4 +304,4 @@ bwformat(BufferWriter & w, Spec const& spec, IPRange const& range) {
 }
 
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/src/swoc_file.cc b/swoc++/src/swoc_file.cc
index 5f1c4d6..254bff6 100644
--- a/swoc++/src/swoc_file.cc
+++ b/swoc++/src/swoc_file.cc
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Apache Software Foundation 2019
 /** @file
 
     Minimalist version of std::filesystem.
@@ -23,9 +25,9 @@
 #include "swoc/swoc_file.h"
 #include "swoc/bwf_base.h"
 
-using namespace swoc::literals;
+using namespace SWOC_NAMESPACE::literals;
 
-namespace swoc
+namespace SWOC_NAMESPACE
 {
 namespace file
 {
@@ -143,4 +145,4 @@ bwformat(BufferWriter &w, bwf::Spec const &spec, file::path const &p)
   return bwformat(w, spec, p.string());
 }
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/swoc++/src/swoc_ip.cc b/swoc++/src/swoc_ip.cc
index 878abc3..7a5906a 100644
--- a/swoc++/src/swoc_ip.cc
+++ b/swoc++/src/swoc_ip.cc
@@ -1,31 +1,18 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Network Geographics 2014
 /** @file
 
   IP address support.
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
-  See the NOTICE file distributed with this work for additional information regarding copyright
-  ownership.  The ASF licenses this file to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance with the License.  You may obtain a
-  copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software distributed under the License
-  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-  or implied. See the License for the specific language governing permissions and limitations under
-  the License.
  */
 
-#include <swoc/swoc_ip.h>
+#include "swoc/swoc_ip.h"
 #include "swoc/swoc_ip.h"
 #include "swoc/swoc_meta.h"
 
 using swoc::TextView;
 using swoc::svtoi;
 using swoc::svtou;
-using namespace swoc::literals;
+using namespace SWOC_NAMESPACE::literals;
 
 namespace {
 // Handle the @c sin_len member, the presence of which varies across compilation environments.
@@ -49,7 +36,7 @@ Set_Sockaddr_Len(T *addr) {
 
 } // namespace
 
-namespace swoc {
+namespace SWOC_NAMESPACE {
 IPAddr const IPAddr::INVALID;
 IP4Addr const IP4Addr::MIN{INADDR_ANY};
 IP4Addr const IP4Addr::MAX{INADDR_BROADCAST};
@@ -979,4 +966,4 @@ void IP6Range::NetSource::search_narrower() {
   }
 }
 
-} // namespace swoc
+} // namespace SWOC_NAMESPACE
diff --git a/tools/ats-revert.sh b/tools/ats-revert.sh
index e94102d..ac72e42 100644
--- a/tools/ats-revert.sh
+++ b/tools/ats-revert.sh
@@ -8,7 +8,7 @@ function rewrite {
   sed -i -E --expr 's!swoc/ext/catch.hpp!catch.hpp!g' $1
   sed -i -E --expr 's!swoc::!ts::!g' $1
   sed -i -E --expr 's!swoc/!tscpp/util/!g' $1
-  sed -i -E --expr 's!namespace swoc!namespace ts!g' $1
+  sed -i -E --expr 's!namespace SWOC_NAMESPACE!namespace ts!g' $1
   sed -i -E --expr 's!ts/swoc_meta!tscpp/util/ts_meta!g' $1
   sed -i -E --expr 's!swoc_meta!ts_meta!g' $1
   sed -i -E --expr 's![[]libswoc[]]![libtscpputil]!' $1
diff --git a/tools/rewrite.sh b/tools/rewrite.sh
index 4cd6ab9..dcdd338 100644
--- a/tools/rewrite.sh
+++ b/tools/rewrite.sh
@@ -1,8 +1,8 @@
 #!/usr/bin/env bash
 
 function rewrite {
-  sed -i -E --expr 's!namespace ts!namespace swoc!g' $1
-  sed -i -E --expr 's!^}\s+// namespace ts!} //namespace swoc!g' $1
+  sed -i -E --expr 's!namespace ts!namespace SWOC_NAMESPACE!g' $1
+  sed -i -E --expr 's!^}\s+// namespace ts!} //namespace SWOC_NAMESPACE!g' $1
   sed -i -E --expr 's!ts::!swoc::!g' $1
   sed -i -E --expr 's!include "tscpp/util/!include "swoc/!' $1
   sed -i -E --expr 's!"[^"]*catch.hpp"!"swoc/ext/catch.hpp"!' $1
diff --git a/tools/update-version.sh b/tools/update-version.sh
index 7cca62e..d54f1fd 100644
--- a/tools/update-version.sh
+++ b/tools/update-version.sh
@@ -6,6 +6,7 @@ if [ -z "$3" ] ; then
 fi
 
 # Header
+sed -i swoc++/include/swoc/swoc_version.h --expr "s/SWOC_namespace SWOC_NAMESPACE_(?:\d+)_(?:\d+)_(?:\d+)/SWOC_namespace SWOC_NAMESPACE_$1_$2_$3/"
 sed -i swoc++/include/swoc/swoc_version.h --expr "s/\(MAJOR_VERSION *= *\).*\$/\\1$1;/"
 sed -i swoc++/include/swoc/swoc_version.h --expr "s/\(MINOR_VERSION *= *\).*\$/\\1$2;/"
 sed -i swoc++/include/swoc/swoc_version.h --expr "s/\(POINT_VERSION *= *\).*\$/\\1$3;/"
diff --git a/unit_tests/ex_MemArena.cc b/unit_tests/ex_MemArena.cc
index e627a41..fce543e 100644
--- a/unit_tests/ex_MemArena.cc
+++ b/unit_tests/ex_MemArena.cc
@@ -19,7 +19,7 @@
 #include <string_view>
 #include <memory>
 #include <random>
-#include <swoc/BufferWriter.h>
+#include "swoc/BufferWriter.h"
 #include "swoc/MemArena.h"
 #include "swoc/TextView.h"
 #include "swoc/IntrusiveHashMap.h"
diff --git a/unit_tests/ex_TextView.cc b/unit_tests/ex_TextView.cc
index a44853f..998e901 100644
--- a/unit_tests/ex_TextView.cc
+++ b/unit_tests/ex_TextView.cc
@@ -24,13 +24,13 @@
 
 #include <array>
 #include <functional>
-#include <swoc/swoc_file.h>
+#include "swoc/swoc_file.h"
 
 #include "swoc/TextView.h"
 #include "catch.hpp"
 
 using swoc::TextView;
-using namespace swoc::literals;
+using namespace SWOC_NAMESPACE::literals;
 
 // CSV parsing.
 namespace
@@ -219,7 +219,7 @@ TEST_CASE("TextView Lines", "[libswoc][example][textview][lines]")
 };
 
 #include <set>
-#include <swoc/swoc_ip.h>
+#include "swoc/swoc_ip.h"
 
 TEST_CASE("TextView misc", "[libswoc][example][textview][misc]")
 {
diff --git a/unit_tests/ex_ipspace_properties.cc b/unit_tests/ex_ipspace_properties.cc
index 196b61a..3ee9269 100644
--- a/unit_tests/ex_ipspace_properties.cc
+++ b/unit_tests/ex_ipspace_properties.cc
@@ -11,13 +11,13 @@
 #include <memory>
 #include <limits>
 
-#include <swoc/TextView.h>
-#include <swoc/swoc_ip.h>
-#include <swoc/bwf_ip.h>
-#include <swoc/bwf_std.h>
+#include "swoc/TextView.h"
+#include "swoc/swoc_ip.h"
+#include "swoc/bwf_ip.h"
+#include "swoc/bwf_std.h"
 
 using namespace std::literals;
-using namespace swoc::literals;
+using namespace SWOC_NAMESPACE::literals;
 using swoc::TextView;
 using swoc::IPEndpoint;
 
diff --git a/unit_tests/test_Lexicon.cc b/unit_tests/test_Lexicon.cc
index 48726f0..d58ec59 100644
--- a/unit_tests/test_Lexicon.cc
+++ b/unit_tests/test_Lexicon.cc
@@ -1,21 +1,8 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Verizon Media 2020
 /** @file
 
     Lexicon unit tests.
-
-    @section license License
-
-    Licensed to the Apache Software Foundation (ASF) under one or more contributor license
-    agreements.  See the NOTICE file distributed with this work for additional information regarding
-    copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with the License.  You may
-    obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software distributed under the
-    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-    express or implied. See the License for the specific language governing permissions and
-    limitations under the License.
 */
 
 #include "swoc/Lexicon.h"
diff --git a/unit_tests/test_TextView.cc b/unit_tests/test_TextView.cc
index 9fd4106..77f5c5f 100644
--- a/unit_tests/test_TextView.cc
+++ b/unit_tests/test_TextView.cc
@@ -28,7 +28,7 @@
 
 using swoc::TextView;
 using namespace std::literals;
-using namespace swoc::literals;
+using namespace SWOC_NAMESPACE::literals;
 
 TEST_CASE("TextView Constructor", "[libswoc][TextView]")
 {
diff --git a/unit_tests/test_bw_format.cc b/unit_tests/test_bw_format.cc
index 84e08bf..6e3b79c 100644
--- a/unit_tests/test_bw_format.cc
+++ b/unit_tests/test_bw_format.cc
@@ -1,21 +1,7 @@
+// SPDX-License-Identifier: Apache-2.0
 /** @file
 
     Unit tests for BufferFormat and bwprint.
-
-    @section license License
-
-    Licensed to the Apache Software Foundation (ASF) under one or more contributor license
-    agreements.  See the NOTICE file distributed with this work for additional information regarding
-    copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with the License.  You may
-    obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software distributed under the
-    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-    express or implied. See the License for the specific language governing permissions and
-    limitations under the License.
  */
 
 #include <chrono>
@@ -32,7 +18,7 @@
 #include "catch.hpp"
 
 using namespace std::literals;
-using namespace swoc::literals;
+using namespace SWOC_NAMESPACE::literals;
 using swoc::TextView;
 using swoc::bwprint;
 
@@ -49,7 +35,7 @@ TEST_CASE("Buffer Writer << operator", "[bufferwriter][stream]") {
 }
 
 TEST_CASE("bwprint basics", "[bwprint]") {
-  swoc::LocalBufferWriter<256> bw;s
+  swoc::LocalBufferWriter<256> bw;
   std::string_view fmt1{"Some text"sv};
   swoc::bwf::Format fmt2("left >{0:<9}< right >{0:>9}< center >{0:^9}<");
   std::string_view text{"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"};
diff --git a/unit_tests/test_ip.cc b/unit_tests/test_ip.cc
index f0f39c3..ed6beec 100644
--- a/unit_tests/test_ip.cc
+++ b/unit_tests/test_ip.cc
@@ -1,6 +1,5 @@
 // SPDX-License-Identifier: Apache-2.0
 // Copyright 2014 Network Geographics
-
 /** @file
 
     IP address support testing.
@@ -10,14 +9,14 @@
 
 #include <set>
 
-#include <swoc/TextView.h>
-#include <swoc/swoc_ip.h>
-#include <swoc/bwf_ip.h>
-#include <swoc/bwf_std.h>
-#include <swoc/swoc_file.h>
+#include "swoc/TextView.h"
+#include "swoc/swoc_ip.h"
+#include "swoc/bwf_ip.h"
+#include "swoc/bwf_std.h"
+#include "swoc/swoc_file.h"
 
 using namespace std::literals;
-using namespace swoc::literals;
+using namespace SWOC_NAMESPACE::literals;
 using swoc::TextView;
 using swoc::IPEndpoint;
 
diff --git a/unit_tests/test_meta.cc b/unit_tests/test_meta.cc
index 00ce1c4..55496d3 100644
--- a/unit_tests/test_meta.cc
+++ b/unit_tests/test_meta.cc
@@ -27,7 +27,7 @@
 #include "catch.hpp"
 
 using swoc::TextView;
-using namespace swoc::literals;
+using namespace SWOC_NAMESPACE::literals;
 
 struct A {
   int _value;


(trafficserver-libswoc) 01/04: Update to 1.2.0

Posted by bn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bneradt pushed a commit to branch dev-1-2-0
in repository https://gitbox.apache.org/repos/asf/trafficserver-libswoc.git

commit 1c86ec0ef4109a0869be9862e44ef0a1a046c8d1
Author: Alan M. Carroll <am...@apache.org>
AuthorDate: Fri Apr 3 12:52:41 2020 -0500

    Update to 1.2.0
---
 doc/Doxyfile                       |  2 +-
 doc/code/IPSpace.en.rst            |  2 +-
 doc/code/TextView.en.rst           |  6 ++--
 doc/conf.py                        |  2 +-
 swoc++/CMakeLists.txt              |  2 +-
 swoc++/include/swoc/swoc_ip.h      | 14 ++------
 swoc++/include/swoc/swoc_version.h |  4 +--
 swoc++/swoc++.part                 |  2 +-
 unit_tests/test_bw_format.cc       | 65 ++++++++++++++++----------------------
 9 files changed, 40 insertions(+), 59 deletions(-)

diff --git a/doc/Doxyfile b/doc/Doxyfile
index 87eab21..ac00ccd 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -38,7 +38,7 @@ PROJECT_NAME           = "LibSWOC++"
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
-PROJECT_NUMBER         = "1.1.5"
+PROJECT_NUMBER         = "1.2.0"
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a
diff --git a/doc/code/IPSpace.en.rst b/doc/code/IPSpace.en.rst
index c19d0f9..0edab18 100644
--- a/doc/code/IPSpace.en.rst
+++ b/doc/code/IPSpace.en.rst
@@ -170,7 +170,7 @@ Blending Bitsets
 
    Some details are omitted for brevity and because they aren't directly relevant. The full
    implementation, which is run as a unit test to verify its correctness,
-   `is available here <https://github.com/SolidWallOfCode/libswoc/blob/1.1.5/unit_tests/ex_ipspace_properties.cc>`__.
+   `is available here <https://github.com/SolidWallOfCode/libswoc/blob/1.2.0/unit_tests/ex_ipspace_properties.cc>`__.
    You can compile and step through the code to see how it works in more detail, or experiment
    with changing some of the example data.
 
diff --git a/doc/code/TextView.en.rst b/doc/code/TextView.en.rst
index b4ca9e5..df2bb94 100644
--- a/doc/code/TextView.en.rst
+++ b/doc/code/TextView.en.rst
@@ -275,7 +275,7 @@ separated by commas.
 
 .. sidebar:: Verification
 
-   `Test code for example <https://github.com/SolidWallOfCode/libswoc/blob/1.1.5/unit_tests/ex_TextView.cc#L67>`__.
+   `Test code for example <https://github.com/SolidWallOfCode/libswoc/blob/1.2.0/unit_tests/ex_TextView.cc#L67>`__.
 
 If :arg:`value` was :literal:`bob  ,dave, sam` then :arg:`token` would be successively
 :literal:`bob`, :literal:`dave`, :literal:`sam`. After :literal:`sam` was extracted :arg:`value`
@@ -297,7 +297,7 @@ for values that are boolean.
 
 .. sidebar:: Verification
 
-   `Test code for example <https://github.com/SolidWallOfCode/libswoc/blob/1.1.5/unit_tests/ex_TextView.cc#L74>`__.
+   `Test code for example <https://github.com/SolidWallOfCode/libswoc/blob/1.2.0/unit_tests/ex_TextView.cc#L74>`__.
 
 The basic list processing is the same as the previous example, with each element being treated as
 a "list" with ``=`` as the separator. Note if there is no ``=`` character then all of the list
@@ -348,7 +348,7 @@ do not, so a flag to strip quotes from the resulting elements is needed. The fin
 
 .. sidebar:: Verification
 
-   `Test code for example <https://github.com/SolidWallOfCode/libswoc/blob/1.1.5/unit_tests/ex_TextView.cc#L90>`__.
+   `Test code for example <https://github.com/SolidWallOfCode/libswoc/blob/1.2.0/unit_tests/ex_TextView.cc#L90>`__.
 
 This takes a :code:`TextView&` which is the source view which will be updated as tokens are removed
 (therefore the caller must do the empty view check). The other arguments are the separator character
diff --git a/doc/conf.py b/doc/conf.py
index 0939355..805d4a4 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -80,7 +80,7 @@ project = u'Solid Wall Of C++'
 copyright = u'{}, amc@apache.org'.format(date.today().year)
 
 # The full version, including alpha/beta/rc tags.
-release = "1.1.5"
+release = "1.2.0"
 # The short X.Y version.
 version = '.'.join(release.split('.', 2)[:2])
 
diff --git a/swoc++/CMakeLists.txt b/swoc++/CMakeLists.txt
index ec2b447..6c9982f 100644
--- a/swoc++/CMakeLists.txt
+++ b/swoc++/CMakeLists.txt
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 3.12)
 
 project(lib-swoc++ CXX)
-set(LIBSWOC_VERSION "1.1.5")
+set(LIBSWOC_VERSION "1.2.0")
 set(CMAKE_CXX_STANDARD 17)
 include(GNUInstallDirs)
 
diff --git a/swoc++/include/swoc/swoc_ip.h b/swoc++/include/swoc/swoc_ip.h
index eb6d5ed..599b36b 100644
--- a/swoc++/include/swoc/swoc_ip.h
+++ b/swoc++/include/swoc/swoc_ip.h
@@ -1,11 +1,9 @@
-#pragma once
-#pragma once
-#pragma once
 // SPDX-License-Identifier: Apache-2.0
 /** @file
    IP address and network related classes.
  */
 
+#pragma once
 #include <netinet/in.h>
 #include <string_view>
 #include <variant>
@@ -16,24 +14,16 @@
 #include <values.h>
 
 namespace swoc {
-class IP4Addr;
 
+class IP4Addr;
 class IP6Addr;
-
 class IPAddr;
-
 class IPMask;
-
 class IP4Range;
-
 class IP6Range;
-
 class IPRange;
-
 class IP4Net;
-
 class IP6Net;
-
 class IPNet;
 
 using ::std::string_view;
diff --git a/swoc++/include/swoc/swoc_version.h b/swoc++/include/swoc/swoc_version.h
index 005371e..94716c3 100644
--- a/swoc++/include/swoc/swoc_version.h
+++ b/swoc++/include/swoc/swoc_version.h
@@ -38,6 +38,6 @@
 namespace swoc
 {
 static constexpr unsigned MAJOR_VERSION = 1;
-static constexpr unsigned MINOR_VERSION = 1;
-static constexpr unsigned POINT_VERSION = 5;
+static constexpr unsigned MINOR_VERSION = 2;
+static constexpr unsigned POINT_VERSION = 0;
 } // namespace swoc
diff --git a/swoc++/swoc++.part b/swoc++/swoc++.part
index 5ef8982..d9270a4 100644
--- a/swoc++/swoc++.part
+++ b/swoc++/swoc++.part
@@ -1,6 +1,6 @@
 Import("*")
 PartName("libswoc")
-PartVersion("1.1.5")
+PartVersion("1.2.0")
 
 src_files = [
     "src/ArenaWriter.cc",
diff --git a/unit_tests/test_bw_format.cc b/unit_tests/test_bw_format.cc
index f6f0aeb..84e08bf 100644
--- a/unit_tests/test_bw_format.cc
+++ b/unit_tests/test_bw_format.cc
@@ -36,8 +36,7 @@ using namespace swoc::literals;
 using swoc::TextView;
 using swoc::bwprint;
 
-TEST_CASE("Buffer Writer << operator", "[bufferwriter][stream]")
-{
+TEST_CASE("Buffer Writer << operator", "[bufferwriter][stream]") {
   swoc::LocalBufferWriter<50> bw;
 
   bw << "The" << ' ' << "quick" << ' ' << "brown fox";
@@ -49,9 +48,8 @@ TEST_CASE("Buffer Writer << operator", "[bufferwriter][stream]")
   REQUIRE(bw.view() == "x=50");
 }
 
-TEST_CASE("bwprint basics", "[bwprint]")
-{
-  swoc::LocalBufferWriter<256> bw;
+TEST_CASE("bwprint basics", "[bwprint]") {
+  swoc::LocalBufferWriter<256> bw;s
   std::string_view fmt1{"Some text"sv};
   swoc::bwf::Format fmt2("left >{0:<9}< right >{0:>9}< center >{0:^9}<");
   std::string_view text{"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"};
@@ -134,8 +132,7 @@ TEST_CASE("bwprint basics", "[bwprint]")
   REQUIRE(bw.view() == " Some text");
 }
 
-TEST_CASE("BWFormat numerics", "[bwprint][bwformat]")
-{
+TEST_CASE("BWFormat numerics", "[bwprint][bwformat]") {
   swoc::LocalBufferWriter<256> bw;
 
   void *ptr = reinterpret_cast<void *>(0XBADD0956);
@@ -245,8 +242,7 @@ TEST_CASE("BWFormat numerics", "[bwprint][bwformat]")
   REQUIRE(bw.view() == "Byte '97'");
 }
 
-TEST_CASE("bwstring", "[bwprint][bwstring]")
-{
+TEST_CASE("bwstring", "[bwprint][bwstring]") {
   std::string s;
   swoc::TextView fmt("{} -- {}");
   std::string_view text{"e99a18c428cb38d5f260853678922e03"};
@@ -301,12 +297,11 @@ TEST_CASE("bwstring", "[bwprint][bwstring]")
   REQUIRE(s == "Null 0x0.0X0.null.NULL");
 }
 
-TEST_CASE("BWFormat integral", "[bwprint][bwformat]")
-{
+TEST_CASE("BWFormat integral", "[bwprint][bwformat]") {
   swoc::LocalBufferWriter<256> bw;
   swoc::bwf::Spec spec;
   uint32_t num = 30;
-  int num_neg  = -30;
+  int num_neg = -30;
 
   // basic
   bwformat(bw, spec, num);
@@ -319,7 +314,7 @@ TEST_CASE("BWFormat integral", "[bwprint][bwformat]")
   // radix
   swoc::bwf::Spec spec_hex;
   spec_hex._radix_lead_p = true;
-  spec_hex._type         = 'x';
+  spec_hex._type = 'x';
   bwformat(bw, spec_hex, num);
   REQUIRE(bw.view() == "0x1e");
   bw.clear();
@@ -332,24 +327,24 @@ TEST_CASE("BWFormat integral", "[bwprint][bwformat]")
 
   swoc::bwf::Spec spec_bin;
   spec_bin._radix_lead_p = true;
-  spec_bin._type         = 'b';
+  spec_bin._type = 'b';
   bwformat(bw, spec_bin, num);
   REQUIRE(bw.view() == "0b11110");
   bw.clear();
 
-  int one     = 1;
-  int two     = 2;
+  int one = 1;
+  int two = 2;
   int three_n = -3;
   // alignment
   swoc::bwf::Spec left;
   left._align = swoc::bwf::Spec::Align::LEFT;
-  left._min   = 5;
+  left._min = 5;
   swoc::bwf::Spec right;
   right._align = swoc::bwf::Spec::Align::RIGHT;
-  right._min   = 5;
+  right._min = 5;
   swoc::bwf::Spec center;
   center._align = swoc::bwf::Spec::Align::CENTER;
-  center._min   = 5;
+  center._min = 5;
 
   bwformat(bw, left, one);
   bwformat(bw, right, two);
@@ -367,8 +362,7 @@ TEST_CASE("BWFormat integral", "[bwprint][bwformat]")
   REQUIRE(bw.view() == "ax == 1");
 }
 
-TEST_CASE("BWFormat floating", "[bwprint][bwformat]")
-{
+TEST_CASE("BWFormat floating", "[bwprint][bwformat]") {
   swoc::LocalBufferWriter<256> bw;
   swoc::bwf::Spec spec;
 
@@ -389,7 +383,7 @@ TEST_CASE("BWFormat floating", "[bwprint][bwformat]")
   REQUIRE(bw.view() == "long 64.90000000000");
   bw.clear();
 
-  double n   = 180.278;
+  double n = 180.278;
   double neg = -238.47;
   bwformat(bw, spec, n);
   REQUIRE(bw.view() == "180.28");
@@ -406,7 +400,7 @@ TEST_CASE("BWFormat floating", "[bwprint][bwformat]")
   REQUIRE(bw.view() == "-238.47000");
   bw.clear();
 
-  float f    = 1234;
+  float f = 1234;
   float fneg = -1;
   bwformat(bw, spec, f);
   REQUIRE(bw.view() == "1234");
@@ -414,7 +408,7 @@ TEST_CASE("BWFormat floating", "[bwprint][bwformat]")
   bwformat(bw, spec, fneg);
   REQUIRE(bw.view() == "-1");
   bw.clear();
-  f          = 1234.5667;
+  f = 1234.5667;
   spec._prec = 4;
   bwformat(bw, spec, f);
   REQUIRE(bw.view() == "1234.5667");
@@ -434,7 +428,7 @@ TEST_CASE("BWFormat floating", "[bwprint][bwformat]")
   bw.clear();
 
   double edge = 0.345;
-  spec._prec  = 3;
+  spec._prec = 3;
   bwformat(bw, spec, edge);
   REQUIRE(bw.view() == "0.345");
   bw.clear();
@@ -448,18 +442,18 @@ TEST_CASE("BWFormat floating", "[bwprint][bwformat]")
   bw.clear();
 
   // alignment
-  double first  = 1.23;
+  double first = 1.23;
   double second = 2.35;
-  double third  = -3.5;
+  double third = -3.5;
   swoc::bwf::Spec left;
   left._align = swoc::bwf::Spec::Align::LEFT;
-  left._min   = 5;
+  left._min = 5;
   swoc::bwf::Spec right;
   right._align = swoc::bwf::Spec::Align::RIGHT;
-  right._min   = 5;
+  right._min = 5;
   swoc::bwf::Spec center;
   center._align = swoc::bwf::Spec::Align::CENTER;
-  center._min   = 5;
+  center._min = 5;
 
   bwformat(bw, left, first);
   bwformat(bw, right, second);
@@ -473,7 +467,7 @@ TEST_CASE("BWFormat floating", "[bwprint][bwformat]")
   double over = 1.4444444;
   swoc::bwf::Spec over_min;
   over_min._prec = 7;
-  over_min._min  = 5;
+  over_min._min = 5;
   bwformat(bw, over_min, over);
   REQUIRE(bw.view() == "1.4444444");
   bw.clear();
@@ -499,8 +493,7 @@ TEST_CASE("BWFormat floating", "[bwprint][bwformat]")
   bw.clear();
 }
 
-TEST_CASE("bwstring std formats", "[libswoc][bwprint]")
-{
+TEST_CASE("bwstring std formats", "[libswoc][bwprint]") {
   std::string_view text{"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"};
   swoc::LocalBufferWriter<120> w;
 
@@ -587,12 +580,10 @@ TEST_CASE("bwstring std formats", "[libswoc][bwprint]")
   w.clear().print("Upper - |{:S}|", text);
   REQUIRE(w.view() == "Upper - |0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ|");
 
-  w.clear().print("Leading{}{}{}.", swoc::bwf::Optional(" | {}  |", s1), swoc::bwf::Optional(" <{}>", empty),
-                  swoc::bwf::If(!s3.empty(), " [{}]", s3));
+  w.clear().print("Leading{}{}{}.", swoc::bwf::Optional(" | {}  |", s1), swoc::bwf::Optional(" <{}>", empty), swoc::bwf::If(!s3.empty(), " [{}]", s3));
   REQUIRE(w.view() == "Leading | Persia  | [Leif].");
   // Do it again, but this time as C strings (char * variants).
-  w.clear().print("Leading{}{}{}.", swoc::bwf::Optional(" | {}  |", s3.data()), swoc::bwf::Optional(" <{}>", empty),
-                  swoc::bwf::If(!s3.empty(), " [{}]", s1.c_str()));
+  w.clear().print("Leading{}{}{}.", swoc::bwf::Optional(" | {}  |", s3.data()), swoc::bwf::Optional(" <{}>", empty), swoc::bwf::If(!s3.empty(), " [{}]", s1.c_str()));
   REQUIRE(w.view() == "Leading | Leif  | [Persia].");
   // Play with string_view
   w.clear().print("Clone?{}{}.", swoc::bwf::Optional(" #. {}", s2), swoc::bwf::Optional(" #. {}", s2.data()));


(trafficserver-libswoc) 03/04: Use nested inline namespace to version API.

Posted by bn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bneradt pushed a commit to branch dev-1-2-0
in repository https://gitbox.apache.org/repos/asf/trafficserver-libswoc.git

commit 5df7c9d2b5d748bd0c4e2cb1db2b54e9b3a51709
Author: Alan M. Carroll <am...@apache.org>
AuthorDate: Sat Apr 4 09:20:52 2020 -0500

    Use nested inline namespace to version API.
---
 example/ex_netdb.cc                    |    4 +-
 swoc++/include/swoc/ArenaWriter.h      |   16 +-
 swoc++/include/swoc/BufferWriter.h     |  192 ++--
 swoc++/include/swoc/DiscreteRange.h    |  394 ++++----
 swoc++/include/swoc/Errata.h           |   28 +-
 swoc++/include/swoc/IntrusiveDList.h   |  385 ++++----
 swoc++/include/swoc/IntrusiveHashMap.h |  296 +++---
 swoc++/include/swoc/Lexicon.h          |  285 +++---
 swoc++/include/swoc/MemArena.h         |   74 +-
 swoc++/include/swoc/MemSpan.h          |    5 +-
 swoc++/include/swoc/RBTree.h           |  408 ++++----
 swoc++/include/swoc/Scalar.h           |  730 +++++++-------
 swoc++/include/swoc/TextView.h         |   19 +-
 swoc++/include/swoc/bwf_base.h         | 1648 +++++++++++++++-----------------
 swoc++/include/swoc/bwf_ex.h           |  372 +++----
 swoc++/include/swoc/bwf_ip.h           |   38 +-
 swoc++/include/swoc/ext/HashFNV.h      |   81 +-
 swoc++/include/swoc/swoc_file.h        |  321 ++++---
 swoc++/include/swoc/swoc_ip.h          |   69 +-
 swoc++/include/swoc/swoc_meta.h        |  327 +++----
 swoc++/include/swoc/swoc_version.h     |   11 +-
 swoc++/src/ArenaWriter.cc              |    6 +-
 swoc++/src/Errata.cc                   |  105 +-
 swoc++/src/MemArena.cc                 |   97 +-
 swoc++/src/RBTree.cc                   |  554 ++++++-----
 swoc++/src/bw_format.cc                | 1087 +++++++++------------
 swoc++/src/bw_ip_format.cc             |  118 ++-
 swoc++/src/swoc_file.cc                |  176 ++--
 swoc++/src/swoc_ip.cc                  |   64 +-
 unit_tests/ex_TextView.cc              |    2 +-
 unit_tests/ex_ipspace_properties.cc    |    2 +-
 unit_tests/test_TextView.cc            |    2 +-
 unit_tests/test_bw_format.cc           |    2 +-
 unit_tests/test_ip.cc                  |    2 +-
 unit_tests/test_meta.cc                |    2 +-
 35 files changed, 3829 insertions(+), 4093 deletions(-)

diff --git a/example/ex_netdb.cc b/example/ex_netdb.cc
index 2f36cf4..76a1b46 100644
--- a/example/ex_netdb.cc
+++ b/example/ex_netdb.cc
@@ -40,7 +40,7 @@
 #include "swoc/Lexicon.h"
 
 using namespace std::literals;
-using namespace SWOC_NAMESPACE::literals;
+using namespace swoc::literals;
 
 using swoc::TextView;
 using swoc::IPEndpoint;
@@ -100,7 +100,7 @@ swoc::Lexicon<PodType> PodTypeNames {{
                                }};
 
 // Create BW formatters for the types so they can be used for output.
-namespace SWOC_NAMESPACE {
+namespace swoc { inline namespace SWOC_VERSION_NS {
 
 BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, PodType pt) {
   return w.write(PodTypeNames[pt]);
diff --git a/swoc++/include/swoc/ArenaWriter.h b/swoc++/include/swoc/ArenaWriter.h
index 02e3cd7..49df69e 100644
--- a/swoc++/include/swoc/ArenaWriter.h
+++ b/swoc++/include/swoc/ArenaWriter.h
@@ -10,8 +10,7 @@
 #include "swoc/bwf_base.h"
 #include "swoc/MemArena.h"
 
-namespace SWOC_NAMESPACE
-{
+namespace swoc { inline namespace SWOC_VERSION_NS {
 /** Buffer writer for a @c MemArena.
  *
  * This provides formatted output to the remnant of a @c MemArena. The output resides in uncommitted
@@ -27,7 +26,7 @@ public:
    *
    * @param arena Arena to use for storage.
    */
-  ArenaWriter(MemArena &arena);
+  ArenaWriter(MemArena& arena);
 
   /** Write data to the buffer.
    *
@@ -35,10 +34,10 @@ public:
    * @param n Amount of data in bytes.
    * @return @a this
    */
-  ArenaWriter &write(void const *data, size_t n) override;
+  ArenaWriter& write(void const *data, size_t n) override;
 
   /// Write a single character @a c to the buffer.
-  ArenaWriter &write(char c) override;
+  ArenaWriter& write(char c) override;
 
   using super_type::write; // import super class write.
 
@@ -50,7 +49,7 @@ public:
   bool commit(size_t n) override;
 
 protected:
-  MemArena &_arena; ///< Arena for the buffer.
+  MemArena& _arena; ///< Arena for the buffer.
 
   /** Reallocate the buffer to increase the capacity.
    *
@@ -59,6 +58,7 @@ protected:
   void realloc(size_t n);
 };
 
-inline swoc::ArenaWriter::ArenaWriter(swoc::MemArena &arena) : super_type(arena.remnant()), _arena(arena) {}
+inline swoc::ArenaWriter::ArenaWriter(swoc::MemArena& arena)
+    : super_type(arena.remnant()), _arena(arena) {}
 
-} // namespace SWOC_NAMESPACE
+}} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/BufferWriter.h b/swoc++/include/swoc/BufferWriter.h
index 27987af..b256884 100644
--- a/swoc++/include/swoc/BufferWriter.h
+++ b/swoc++/include/swoc/BufferWriter.h
@@ -19,14 +19,15 @@
 #include "swoc/TextView.h"
 #include "swoc/MemSpan.h"
 
-namespace SWOC_NAMESPACE
-{
-namespace bwf
-{
-  struct Spec;
-  class Format;
-  class NameBinding;
-  class ArgPack;
+namespace swoc { inline namespace SWOC_VERSION_NS {
+namespace bwf {
+struct Spec;
+
+class Format;
+
+class NameBinding;
+
+class ArgPack;
 } // namespace bwf
 
 /** Wrapper for operations on a buffer.
@@ -46,7 +47,7 @@ public:
    * @param c Character to write.
    * @return @a this.
    */
-  virtual BufferWriter &write(char c) = 0;
+  virtual BufferWriter& write(char c) = 0;
 
   /** Write @a length bytes starting at @a data to the buffer.
    *
@@ -58,7 +59,7 @@ public:
    * subclasses will override this method to use more efficient mechanisms, dependent on the type of
    * output buffer.
    */
-  virtual BufferWriter &write(void const *data, size_t length);
+  virtual BufferWriter& write(void const *data, size_t length);
 
   /** Add the contents of @a sv to the buffer, up to the size of the view.
 
@@ -68,7 +69,7 @@ public:
 
       @return @c *this
   */
-  BufferWriter &write(const std::string_view &sv);
+  BufferWriter& write(const std::string_view& sv);
 
   /// Address of the first byte in the output buffer.
   virtual const char *data() const = 0;
@@ -134,13 +135,13 @@ public:
    * The buffer content is unchanged, only the extent value is adjusted. This effectively discards
    * @a n bytes of already written data.
    */
-  virtual BufferWriter &discard(size_t n) = 0;
+  virtual BufferWriter& discard(size_t n) = 0;
 
   /// Reduce the capacity by @a n bytes
   /// If the capacity is reduced below the current @c size the instance goes in to an error state.
   /// @see restore
   /// @return @c *this
-  virtual BufferWriter &restrict(size_t n) = 0;
+  virtual BufferWriter& restrict(size_t n) = 0;
 
   /// Restore @a n bytes of capacity.
   /// If there is an error condition, this function clears it and sets the extent to the size.  It
@@ -148,7 +149,7 @@ public:
   /// @note This does not make the internal buffer size larger. It can only restore capacity earlier
   /// removed by @c restrict.
   /// @see restrict
-  virtual BufferWriter &restore(size_t n) = 0;
+  virtual BufferWriter& restore(size_t n) = 0;
 
   /** Copy data from one part of the buffer to another.
    *
@@ -164,7 +165,7 @@ public:
    *
    * @internal This is used to perform justification for formatting.
    */
-  virtual BufferWriter &copy(size_t dst, size_t src, size_t n) = 0;
+  virtual BufferWriter& copy(size_t dst, size_t src, size_t n) = 0;
 
   // Force virtual destructor.
   virtual ~BufferWriter();
@@ -182,7 +183,7 @@ public:
    * @note This must be declared here, but the implementation is in @c bwf_base.h. That file does
    * not need to be included if formatted output is not used.
    */
-  template <typename... Args> BufferWriter &print(const TextView &fmt, Args &&... args);
+  template<typename... Args> BufferWriter& print(const TextView& fmt, Args&& ... args);
 
   /** Formatted output to the buffer.
    *
@@ -195,7 +196,8 @@ public:
    * output should gather their formatting arguments into a tuple, usually using
    * @c std::forward_as_tuple().
    */
-  template <typename... Args> BufferWriter &print_v(const TextView &fmt, const std::tuple<Args...> &args);
+  template<typename... Args>
+  BufferWriter& print_v(const TextView& fmt, const std::tuple<Args...>& args);
 
   /** Formatted output to the buffer.
    *
@@ -204,7 +206,7 @@ public:
    * @param args Arguments for the format string.
    * @return @a this.
    */
-  template <typename... Args> BufferWriter &print(const bwf::Format &fmt, Args &&... args);
+  template<typename... Args> BufferWriter& print(const bwf::Format& fmt, Args&& ... args);
 
   /** Formatted output to the buffer.
    *
@@ -217,7 +219,8 @@ public:
    * output should gather their formatting arguments into a tuple, usually using
    * @c std::forward_as_tuple().
    */
-  template <typename... Args> BufferWriter &print_v(const bwf::Format &fmt, const std::tuple<Args...> &args);
+  template<typename... Args>
+  BufferWriter& print_v(const bwf::Format& fmt, const std::tuple<Args...>& args);
 
   /** Write formatted output of @a args to @a this buffer.
    *
@@ -244,8 +247,8 @@ public:
    *
    * @see NameBinding
    */
-  template <typename Binding, typename Extractor>
-  BufferWriter &print_nfv(Binding &&names, Extractor &&ex, bwf::ArgPack const &args);
+  template<typename Binding, typename Extractor>
+  BufferWriter& print_nfv(Binding&& names, Extractor&& ex, bwf::ArgPack const& args);
 
   /** Write formatted output of @a args to @a this buffer.
    *
@@ -257,7 +260,8 @@ public:
    * @note This is primarily an internal convenience for certain situations where a format parameter
    * tuple is not needed and difficult to create.
    */
-  template <typename Binding, typename Extractor> BufferWriter &print_nfv(Binding const &names, Extractor &&ex);
+  template<typename Binding, typename Extractor>
+  BufferWriter& print_nfv(Binding const& names, Extractor&& ex);
 
   /** Write formatted output to @a this buffer.
    *
@@ -267,7 +271,7 @@ public:
    * This is intended to be use with context name binding where @a names has the bindings and the
    * format string @a fmt contains only references to those names, not to any arguments.
    */
-  template <typename Binding> BufferWriter &print_n(Binding const &names, TextView const &fmt);
+  template<typename Binding> BufferWriter& print_n(Binding const& names, TextView const& fmt);
 
   /** IO stream operator.
    *
@@ -276,7 +280,7 @@ public:
    *
    * Write the buffer contents to @a stream.
    */
-  virtual std::ostream &operator>>(std::ostream &stream) const = 0;
+  virtual std::ostream& operator>>(std::ostream& stream) const = 0;
 };
 
 /** A concrete @c BufferWriter class for a fixed buffer.
@@ -294,34 +298,34 @@ public:
   FixedBufferWriter(char *buffer, size_t capacity);
 
   /// Construct using the memory @a span as the buffer.
-  FixedBufferWriter(MemSpan<void> const &span);
+  FixedBufferWriter(MemSpan<void> const& span);
 
   /// Construct using the memory @a span as the buffer.
-  FixedBufferWriter(MemSpan<char> const &span);
+  FixedBufferWriter(MemSpan<char> const& span);
 
   /** Constructor an empty buffer with no capacity.
    * This can be useful to measure the extent of the output before allocating memory.
    */
   FixedBufferWriter(std::nullptr_t);
 
-  FixedBufferWriter(const FixedBufferWriter &) = delete;
+  FixedBufferWriter(const FixedBufferWriter&) = delete;
 
-  FixedBufferWriter &operator=(const FixedBufferWriter &) = delete;
+  FixedBufferWriter& operator=(const FixedBufferWriter&) = delete;
 
   /// Move constructor.
-  FixedBufferWriter(FixedBufferWriter &&that);
+  FixedBufferWriter(FixedBufferWriter&& that);
 
   /// Move assignment.
-  FixedBufferWriter &operator=(FixedBufferWriter &&that);
+  FixedBufferWriter& operator=(FixedBufferWriter&& that);
 
   /// Reset buffer.
-  self_type &assign(MemSpan<char> const &span);
+  self_type& assign(MemSpan<char> const& span);
 
   /// Write a single character @a c to the buffer.
-  FixedBufferWriter &write(char c) override;
+  FixedBufferWriter& write(char c) override;
 
   /// Write @a length bytes, starting at @a data, to the buffer.
-  FixedBufferWriter &write(const void *data, size_t length) override;
+  FixedBufferWriter& write(const void *data, size_t length) override;
 
   // Bring in non-overridden methods.
   using super_type::write;
@@ -345,16 +349,16 @@ public:
   bool commit(size_t n) override;
 
   /// Drop @a n characters from the end of the buffer.
-  self_type &discard(size_t n) override;
+  self_type& discard(size_t n) override;
 
   /// Reduce the capacity by @a n.
-  self_type &restrict(size_t n) override;
+  self_type& restrict(size_t n) override;
 
   /// Restore @a n bytes of the capacity.
-  self_type &restore(size_t n) override;
+  self_type& restore(size_t n) override;
 
   /// Copy data in the buffer.
-  FixedBufferWriter &copy(size_t dst, size_t src, size_t n) override;
+  FixedBufferWriter& copy(size_t dst, size_t src, size_t n) override;
 
   /// Erase the buffer, reset to empty (no valid data).
   /// This is a convenience for reusing a buffer. For instance
@@ -362,9 +366,10 @@ public:
   ///   bw.clear().print("....."); // clear old data and print new data.
   /// @endcode
   /// This is equivalent to @c w.discard(w.size()) but clearer for that case.
-  self_type &clear();
+  self_type& clear();
+
+  self_type& detach();
 
-  self_type &detach();
   /// @return The used part of the buffer as a @c std::string_view.
   std::string_view view() const;
 
@@ -372,16 +377,17 @@ public:
   operator std::string_view() const;
 
   /// Output the buffer contents to the @a stream.
-  std::ostream &operator>>(std::ostream &stream) const override;
+  std::ostream& operator>>(std::ostream& stream) const override;
 
   /// @cond COVARY
-  template <typename... Rest> self_type &print(TextView fmt, Rest &&... rest);
+  template<typename... Rest> self_type& print(TextView fmt, Rest&& ... rest);
 
-  template <typename... Args> self_type &print_v(TextView fmt, std::tuple<Args...> const &args);
+  template<typename... Args> self_type& print_v(TextView fmt, std::tuple<Args...> const& args);
 
-  template <typename... Args> self_type &print(bwf::Format const &fmt, Args &&... args);
+  template<typename... Args> self_type& print(bwf::Format const& fmt, Args&& ... args);
 
-  template <typename... Args> self_type &print_v(bwf::Format const &fmt, std::tuple<Args...> const &args);
+  template<typename... Args>
+  self_type& print_v(bwf::Format const& fmt, std::tuple<Args...> const& args);
   /// @endcond
 
 protected:
@@ -413,15 +419,17 @@ protected:
  * create_note(LocalBufferWriter<256>().print("Note {}", idx).view());
  * @endcode
  */
-template <size_t N> class LocalBufferWriter : public FixedBufferWriter {
+template<size_t N> class LocalBufferWriter : public FixedBufferWriter {
   using self_type  = LocalBufferWriter;
   using super_type = FixedBufferWriter;
 
 public:
   /// Construct an empty writer.
   LocalBufferWriter();
-  LocalBufferWriter(const LocalBufferWriter &that) = delete;
-  LocalBufferWriter &operator=(const LocalBufferWriter &that) = delete;
+
+  LocalBufferWriter(const LocalBufferWriter& that) = delete;
+
+  LocalBufferWriter& operator=(const LocalBufferWriter& that) = delete;
 
 protected:
   char _arr[N]; ///< output buffer.
@@ -431,19 +439,18 @@ protected:
 
 inline BufferWriter::~BufferWriter() {}
 
-inline BufferWriter &
+inline BufferWriter&
 BufferWriter::write(const void *data, size_t length) {
   const char *d = static_cast<const char *>(data);
 
-  while (length--)
-  {
+  while (length--) {
     this->write(*(d++));
   }
   return *this;
 }
 
-inline BufferWriter &
-BufferWriter::write(const std::string_view &sv) {
+inline BufferWriter&
+BufferWriter::write(const std::string_view& sv) {
   return this->write(sv.data(), sv.size());
 }
 
@@ -463,54 +470,54 @@ BufferWriter::remaining() const {
 }
 
 // --- FixedBufferWriter ---
-inline FixedBufferWriter::FixedBufferWriter(char *buffer, size_t capacity) : _buffer(buffer), _capacity(capacity) {
-  if (_capacity != 0 && buffer == nullptr)
-  {
-    throw(std::invalid_argument{"FixedBufferWriter created with null buffer and non-zero size."});
+inline FixedBufferWriter::FixedBufferWriter(char *buffer, size_t capacity)
+    : _buffer(buffer), _capacity(capacity) {
+  if (_capacity != 0 && buffer == nullptr) {
+    throw (std::invalid_argument{"FixedBufferWriter created with null buffer and non-zero size."});
   };
 }
 
-inline FixedBufferWriter::FixedBufferWriter(MemSpan<void> const &span)
-  : _buffer{static_cast<char *>(span.data())}, _capacity{span.size()} {}
+inline FixedBufferWriter::FixedBufferWriter(MemSpan<void> const& span)
+    : _buffer{static_cast<char *>(span.data())}, _capacity{span.size()} {}
 
-inline FixedBufferWriter::FixedBufferWriter(MemSpan<char> const &span) : _buffer{span.begin()}, _capacity{span.size()} {}
+inline FixedBufferWriter::FixedBufferWriter(MemSpan<char> const& span) : _buffer{span.begin()}
+                                                                         , _capacity{span.size()} {}
 
 inline FixedBufferWriter::FixedBufferWriter(std::nullptr_t) : _buffer(nullptr), _capacity(0) {}
 
-inline FixedBufferWriter::self_type &
+inline FixedBufferWriter::self_type&
 FixedBufferWriter::detach() {
   const_cast<char *&>(_buffer) = nullptr;
-  _capacity                    = 0;
-  _attempted                   = 0;
+  _capacity = 0;
+  _attempted = 0;
   return *this;
 }
 
-inline FixedBufferWriter::FixedBufferWriter(FixedBufferWriter &&that)
-  : _buffer(that._buffer), _capacity(that._capacity), _attempted(that._attempted) {
+inline FixedBufferWriter::FixedBufferWriter(FixedBufferWriter&& that)
+    : _buffer(that._buffer), _capacity(that._capacity), _attempted(that._attempted) {
   that.detach();
 }
 
-inline FixedBufferWriter::self_type &
-FixedBufferWriter::assign(MemSpan<char> const &span) {
+inline FixedBufferWriter::self_type&
+FixedBufferWriter::assign(MemSpan<char> const& span) {
   const_cast<char *&>(_buffer) = span.data();
-  _capacity                    = span.size();
-  _attempted                   = 0;
+  _capacity = span.size();
+  _attempted = 0;
   return *this;
 }
 
-inline FixedBufferWriter &
-FixedBufferWriter::operator=(FixedBufferWriter &&that) {
+inline FixedBufferWriter&
+FixedBufferWriter::operator=(FixedBufferWriter&& that) {
   const_cast<char *&>(_buffer) = that._buffer;
-  _capacity                    = that._capacity;
-  _attempted                   = that._attempted;
+  _capacity = that._capacity;
+  _attempted = that._attempted;
   that.detach();
   return *this;
 }
 
-inline FixedBufferWriter &
+inline FixedBufferWriter&
 FixedBufferWriter::write(char c) {
-  if (_attempted < _capacity)
-  {
+  if (_attempted < _capacity) {
     _buffer[_attempted] = c;
   }
   ++_attempted;
@@ -518,17 +525,16 @@ FixedBufferWriter::write(char c) {
   return *this;
 }
 
-inline FixedBufferWriter &
+inline FixedBufferWriter&
 FixedBufferWriter::write(const void *data, size_t length) {
   const size_t newSize = _attempted + length;
 
-  if (_buffer)
-  {
-    if (newSize <= _capacity)
-    {
+  if (_buffer) {
+    if (newSize <= _capacity) {
       std::memcpy(_buffer + _attempted, data, length);
-    } else if (_attempted < _capacity)
-    { std::memcpy(_buffer + _attempted, data, _capacity - _attempted); }
+    } else if (_attempted < _capacity) {
+      std::memcpy(_buffer + _attempted, data, _capacity - _attempted);
+    }
   }
   _attempted = newSize;
 
@@ -569,19 +575,17 @@ FixedBufferWriter::extent() const {
 }
 
 inline auto
-FixedBufferWriter::restrict(size_t n) -> self_type & {
-  if (n > _capacity)
-  {
-    throw(std::invalid_argument{"FixedBufferWriter restrict value more than capacity"});
+FixedBufferWriter::restrict(size_t n) -> self_type& {
+  if (n > _capacity) {
+    throw (std::invalid_argument{"FixedBufferWriter restrict value more than capacity"});
   }
   _capacity -= n;
   return *this;
 }
 
 inline auto
-FixedBufferWriter::restore(size_t n) -> self_type & {
-  if (error())
-  {
+FixedBufferWriter::restore(size_t n) -> self_type& {
+  if (error()) {
     _attempted = _capacity;
   }
   _capacity += n;
@@ -589,19 +593,19 @@ FixedBufferWriter::restore(size_t n) -> self_type & {
 }
 
 inline auto
-FixedBufferWriter::discard(size_t n) -> self_type & {
+FixedBufferWriter::discard(size_t n) -> self_type& {
   _attempted -= std::min(_attempted, n);
   return *this;
 }
 
 inline auto
-FixedBufferWriter::clear() -> self_type & {
+FixedBufferWriter::clear() -> self_type& {
   _attempted = 0;
   return *this;
 }
 
 inline auto
-FixedBufferWriter::copy(size_t dst, size_t src, size_t n) -> self_type & {
+FixedBufferWriter::copy(size_t dst, size_t src, size_t n) -> self_type& {
   auto limit = std::min<size_t>(_capacity, _attempted); // max offset of region possible.
   MemSpan<char> src_span{_buffer + src, std::min(limit, src + n)};
   MemSpan<char> dst_span{_buffer + dst, std::min(limit, dst + n)};
@@ -620,9 +624,9 @@ inline FixedBufferWriter::operator std::string_view() const {
 }
 
 // --- LocalBufferWriter ---
-template <size_t N> LocalBufferWriter<N>::LocalBufferWriter() : super_type(_arr, N) {}
+template<size_t N> LocalBufferWriter<N>::LocalBufferWriter() : super_type(_arr, N) {}
 
-} // namespace SWOC_NAMESPACE
+}} // namespace SWOC_NAMESPACE
 
 namespace std
 {
diff --git a/swoc++/include/swoc/DiscreteRange.h b/swoc++/include/swoc/DiscreteRange.h
index 0c988bf..cb9f976 100644
--- a/swoc++/include/swoc/DiscreteRange.h
+++ b/swoc++/include/swoc/DiscreteRange.h
@@ -16,51 +16,48 @@
 #include "swoc/RBTree.h"
 #include "swoc/MemArena.h"
 
-namespace SWOC_NAMESPACE
-{
-/// Internal implementation namespace.
-namespace detail
-{
-
-  /// A set of metafunctions to get extrema from a metric type.
-  /// These probe for a static member and falls back to @c std::numeric_limits.
-  /// @{
-  template <typename M>
-  constexpr auto
-  maximum(meta::CaseTag<0>) -> M {
-    return std::numeric_limits<M>::max();
-  }
+namespace swoc { inline namespace SWOC_VERSION_NS {
+namespace detail {
+
+/// A set of metafunctions to get extrema from a metric type.
+/// These probe for a static member and falls back to @c std::numeric_limits.
+/// @{
+template<typename M>
+constexpr auto
+maximum(meta::CaseTag<0>) -> M {
+  return std::numeric_limits<M>::max();
+}
 
-  template <typename M>
-  constexpr auto
-  maximum(meta::CaseTag<1>) -> decltype(M::MAX) {
-    return M::MAX;
-  }
+template<typename M>
+constexpr auto
+maximum(meta::CaseTag<1>) -> decltype(M::MAX) {
+  return M::MAX;
+}
 
-  template <typename M>
-  constexpr M
-  maximum() {
-    return maximum<M>(meta::CaseArg);
-  }
+template<typename M>
+constexpr M
+maximum() {
+  return maximum<M>(meta::CaseArg);
+}
 
-  template <typename M>
-  constexpr auto
-  minimum(meta::CaseTag<0>) -> M {
-    return std::numeric_limits<M>::min();
-  }
+template<typename M>
+constexpr auto
+minimum(meta::CaseTag<0>) -> M {
+  return std::numeric_limits<M>::min();
+}
 
-  template <typename M>
-  constexpr auto
-  minimum(meta::CaseTag<1>) -> decltype(M::MIN) {
-    return M::MIN;
-  }
+template<typename M>
+constexpr auto
+minimum(meta::CaseTag<1>) -> decltype(M::MIN) {
+  return M::MIN;
+}
 
-  template <typename M>
-  constexpr M
-  minimum() {
-    return minimum<M>(meta::CaseArg);
-  }
-  /// @}
+template<typename M>
+constexpr M
+minimum() {
+  return minimum<M>(meta::CaseArg);
+}
+/// @}
 } // namespace detail
 
 /// Relationship between two intervals.
@@ -74,7 +71,7 @@ enum class DiscreteRangeRelation : uint8_t {
 };
 
 /// Relationship between one edge of an interval and the "opposite" edge of another.
-enum class DiscreteRangeEdgeRelation : uint8_t  {
+enum class DiscreteRangeEdgeRelation : uint8_t {
   NONE, ///< Edge is on the opposite side of the relating edge.
   GAP, ///< There is a gap between the edges.
   ADJ, ///< The edges are adjacent.
@@ -98,7 +95,7 @@ enum class DiscreteRangeEdgeRelation : uint8_t  {
    An interval can be @em empty and contain no values. This is the state
    of a default constructed interval.
  */
-template <typename T> class DiscreteRange {
+template<typename T> class DiscreteRange {
   using self_type   = DiscreteRange;
 
 protected:
@@ -120,14 +117,14 @@ public:
    *
    * @note Not marked @c explicit and so serves as a conversion from scalar values to an interval.
    */
-  constexpr DiscreteRange(T const &value) : _min(value), _max(value) {};
+  constexpr DiscreteRange(T const& value) : _min(value), _max(value) {};
 
   /** Constructor.
    *
    * @param min Minimum value in the interval.
    * @param max Maximum value in the interval.
    */
-  constexpr DiscreteRange(T const &min, T const &max) : _min(min), _max(max) {}
+  constexpr DiscreteRange(T const& min, T const& max) : _min(min), _max(max) {}
 
   ~DiscreteRange() = default;
 
@@ -138,30 +135,33 @@ public:
    */
   bool empty() const;
 
-  self_type &assign(metric_type const &min, metric_type const &max);
+  self_type& assign(metric_type const& min, metric_type const& max);
 
   /// Set the interval to be a singleton.
-  self_type &assign(metric_type const &singleton);
+  self_type& assign(metric_type const& singleton);
 
-  self_type &assign_min(metric_type const &min);
+  self_type& assign_min(metric_type const& min);
 
-  self_type &assign_max(metric_type const &max);
+  self_type& assign_max(metric_type const& max);
 
   /** Decrement the maximum value.
    *
    * @return @a this.
    */
-  self_type &clip_max() { --_max; return *this; }
+  self_type& clip_max() {
+    --_max;
+    return *this;
+  }
 
   /** Get the minimum value in the interval.
       @note The return value is unspecified if the interval is empty.
    */
-  metric_type const &min() const;
+  metric_type const& min() const;
 
   /** Get the maximum value in the interval.
       @note The return value is unspecified if the interval is empty.
    */
-  metric_type const &max() const;
+  metric_type const& max() const;
 
   /** Check if a value is in @a this range.
    *
@@ -176,7 +176,7 @@ public:
       @return @c true if there is at least one common value in the
       two intervals, @c false otherwise.
   */
-  bool has_intersection_with(self_type const &that) const;
+  bool has_intersection_with(self_type const& that) const;
 
   /** Compute the intersection of two intervals
       @return The interval consisting of values that are contained by
@@ -184,13 +184,13 @@ public:
       are disjoint.
       @internal Co-variant
    */
-  self_type intersection(self_type const &that) const;
+  self_type intersection(self_type const& that) const;
 
   /** Test for adjacency.
       @return @c true if the intervals are adjacent.
       @note Only disjoint intervals can be adjacent.
    */
-  bool is_adjacent_to(self_type const &that) const;
+  bool is_adjacent_to(self_type const& that) const;
 
   /** Test for @a this being adjacent on the left of @a that.
    *
@@ -200,32 +200,32 @@ public:
   bool is_left_adjacent_to(self_type const& that) const;
 
   //! Test if the union of two intervals is also an interval.
-  bool has_union(self_type const &that) const;
+  bool has_union(self_type const& that) const;
 
   /** Test if an interval is a superset of or equal to another.
       @return @c true if every value in @c that is also in @c this.
    */
-  bool is_superset_of(self_type const &that) const;
+  bool is_superset_of(self_type const& that) const;
 
   /** Test if an interval is a subset or equal to another.
       @return @c true if every value in @c this is also in @c that.
    */
-  bool is_subset_of(self_type const &that) const;
+  bool is_subset_of(self_type const& that) const;
 
   /** Test if an interval is a strict superset of another.
       @return @c true if @c this is strictly a superset of @a rhs.
    */
-  bool is_strict_superset_of(self_type const &that) const;
+  bool is_strict_superset_of(self_type const& that) const;
 
   /** Test if an interval is a strict subset of another.
       @return @c true if @c this is strictly a subset of @a that.
    */
-  bool is_strict_subset_of(self_type const &that) const;
+  bool is_strict_subset_of(self_type const& that) const;
 
   /** Determine the relationship between @c this and @a that interval.
       @return The relationship type.
    */
-  Relation relationship(self_type const &that) const;
+  Relation relationship(self_type const& that) const;
 
   /** Determine the relationship of the left edge of @a that with @a this.
    *
@@ -251,7 +251,7 @@ public:
       and @a that interval.
       @internal Co-variant
    */
-  self_type hull(self_type const &that) const;
+  self_type hull(self_type const& that) const;
 
   //! Check if the interval is exactly one element.
   bool is_singleton() const;
@@ -273,18 +273,19 @@ public:
   /** Clip interval.
       Remove all element in @c this interval not in @a that interval.
    */
-  self_type &operator&=(self_type const &that);
+  self_type& operator&=(self_type const& that);
 
   /** Convex hull.
       Extend interval to cover all elements in @c this and @a that.
    */
-  self_type &operator|=(self_type const &that);
+  self_type& operator|=(self_type const& that);
 
-  self_type & clear() {
+  self_type& clear() {
     _min = detail::maximum<T>();
     _max = detail::minimum<T>();
     return *this;
   }
+
   /** Functor for lexicographic ordering.
       If, for some reason, an interval needs to be put in a container
       that requires a strict weak ordering, the default @c operator @c < will
@@ -301,34 +302,36 @@ public:
    */
   struct lexicographic_order : public std::binary_function<self_type, self_type, bool> {
     //! Functor operator.
-    bool operator()(self_type const &lhs, self_type const &rhs) const;
+    bool operator()(self_type const& lhs, self_type const& rhs) const;
   };
 };
 
-template <typename T>
+template<typename T>
 bool
-DiscreteRange<T>::lexicographic_order::operator()(DiscreteRange::self_type const &lhs, DiscreteRange::self_type const &rhs) const {
+DiscreteRange<T>::lexicographic_order::operator()(DiscreteRange::self_type const& lhs
+                                                  , DiscreteRange::self_type const& rhs) const {
   return lhs._min == rhs._min ? lhs._max < rhs._max : lhs._min < rhs._min;
 }
 
-template <typename T>
-DiscreteRange<T> &
-DiscreteRange<T>::assign(metric_type const &min, metric_type const &max) {
+template<typename T>
+DiscreteRange<T>&
+DiscreteRange<T>::assign(metric_type const& min, metric_type const& max) {
   _min = min;
   _max = max;
   return *this;
 }
 
-template <typename T>
+template<typename T>
 DiscreteRange<T>
-DiscreteRange<T>::hull(DiscreteRange::self_type const &that) const {
+DiscreteRange<T>::hull(DiscreteRange::self_type const& that) const {
   // need to account for invalid ranges.
-  return !*this ? that : !that ? *this : self_type(std::min(_min, that._min), std::max(_max, that._max));
+  return !*this ? that : !that ? *this
+                               : self_type(std::min(_min, that._min), std::max(_max, that._max));
 }
 
-template <typename T>
+template<typename T>
 typename DiscreteRange<T>::Relation
-DiscreteRange<T>::relationship(self_type const &that) const {
+DiscreteRange<T>::relationship(self_type const& that) const {
   Relation retval = Relation::NONE;
   if (this->has_intersection(that)) {
     if (*this == that)
@@ -345,48 +348,48 @@ DiscreteRange<T>::relationship(self_type const &that) const {
   return retval;
 }
 
-template <typename T>
-DiscreteRange<T> &
-DiscreteRange<T>::assign(metric_type const &singleton) {
+template<typename T>
+DiscreteRange<T>&
+DiscreteRange<T>::assign(metric_type const& singleton) {
   _min = singleton;
   _max = singleton;
   return *this;
 }
 
-template <typename T>
-DiscreteRange<T> &
-DiscreteRange<T>::assign_min(metric_type const &min) {
+template<typename T>
+DiscreteRange<T>&
+DiscreteRange<T>::assign_min(metric_type const& min) {
   _min = min;
   return *this;
 }
 
-template <typename T>
+template<typename T>
 bool
 DiscreteRange<T>::is_singleton() const {
   return _min == _max;
 }
 
-template <typename T>
+template<typename T>
 bool
 DiscreteRange<T>::empty() const {
   return _min > _max;
 }
 
-template <typename T>
+template<typename T>
 bool
 DiscreteRange<T>::is_maximal() const {
   return _min == detail::minimum<T>() && _max == detail::maximum<T>();
 }
 
-template <typename T>
+template<typename T>
 bool
-DiscreteRange<T>::is_strict_superset_of(DiscreteRange::self_type const &that) const {
+DiscreteRange<T>::is_strict_superset_of(DiscreteRange::self_type const& that) const {
   return (_min < that._min && that._max <= _max) || (_min <= that._min && that._max < _max);
 }
 
-template <typename T>
-DiscreteRange<T> &
-DiscreteRange<T>::operator|=(DiscreteRange::self_type const &that) {
+template<typename T>
+DiscreteRange<T>&
+DiscreteRange<T>::operator|=(DiscreteRange::self_type const& that) {
   if (!*this) {
     *this = that;
   } else if (that) {
@@ -400,71 +403,71 @@ DiscreteRange<T>::operator|=(DiscreteRange::self_type const &that) {
   return *this;
 }
 
-template <typename T>
-DiscreteRange<T> &
-DiscreteRange<T>::assign_max(metric_type const &max) {
+template<typename T>
+DiscreteRange<T>&
+DiscreteRange<T>::assign_max(metric_type const& max) {
   _max = max;
   return *this;
 }
 
-template <typename T>
+template<typename T>
 bool
-DiscreteRange<T>::is_strict_subset_of(DiscreteRange::self_type const &that) const {
+DiscreteRange<T>::is_strict_subset_of(DiscreteRange::self_type const& that) const {
   return that.is_strict_superset_of(*this);
 }
 
-template <typename T>
+template<typename T>
 bool
-DiscreteRange<T>::is_subset_of(DiscreteRange::self_type const &that) const {
+DiscreteRange<T>::is_subset_of(DiscreteRange::self_type const& that) const {
   return that.is_superset_of(*this);
 }
 
-template <typename T>
-T const &
+template<typename T>
+T const&
 DiscreteRange<T>::min() const {
   return _min;
 }
 
-template <typename T>
-T const &
+template<typename T>
+T const&
 DiscreteRange<T>::max() const {
   return _max;
 }
 
-template <typename T>
+template<typename T>
 bool
-DiscreteRange<T>::has_union(DiscreteRange::self_type const &that) const {
+DiscreteRange<T>::has_union(DiscreteRange::self_type const& that) const {
   return this->has_intersection(that) || this->is_adjacent_to(that);
 }
 
-template <typename T>
-DiscreteRange<T> &
-DiscreteRange<T>::operator&=(DiscreteRange::self_type const &that) {
+template<typename T>
+DiscreteRange<T>&
+DiscreteRange<T>::operator&=(DiscreteRange::self_type const& that) {
   *this = this->intersection(that);
   return *this;
 }
 
-template <typename T>
+template<typename T>
 bool
-DiscreteRange<T>::has_intersection_with(DiscreteRange::self_type const &that) const {
+DiscreteRange<T>::has_intersection_with(DiscreteRange::self_type const& that) const {
   return (that._min <= _min && _min <= that._max) || (_min <= that._min && that._min <= _max);
 }
 
-template <typename T>
+template<typename T>
 bool
-DiscreteRange<T>::is_superset_of(DiscreteRange::self_type const &that) const {
+DiscreteRange<T>::is_superset_of(DiscreteRange::self_type const& that) const {
   return _min <= that._min && that._max <= _max;
 }
 
-template <typename T>
+template<typename T>
 bool
-DiscreteRange<T>::is_adjacent_to(DiscreteRange::self_type const &that) const {
+DiscreteRange<T>::is_adjacent_to(DiscreteRange::self_type const& that) const {
   return this->is_left_adjacent_to(that) || that.is_left_adjacent_to(*this);
 }
 
-template <typename T>
+template<typename T>
 bool
-DiscreteRange<T>::is_left_adjacent_to(DiscreteRange::self_type const &that) const {
+DiscreteRange<T>::is_left_adjacent_to(DiscreteRange::self_type const& that) const {
   /* Need to be careful here. We don't know much about T and we certainly don't know if "t+1"
    * even compiles for T. We do require the increment operator, however, so we can use that on a
    * copy to get the equivalent of t+1 for adjacency testing. We must also handle the possibility
@@ -474,9 +477,9 @@ DiscreteRange<T>::is_left_adjacent_to(DiscreteRange::self_type const &that) cons
   return _max < that._min && ++metric_type(_max) == that._min;
 }
 
-template <typename T>
+template<typename T>
 DiscreteRange<T>
-DiscreteRange<T>::intersection(DiscreteRange::self_type const &that) const {
+DiscreteRange<T>::intersection(DiscreteRange::self_type const& that) const {
   return {std::max(_min, that._min), std::min(_max, that._max)};
 }
 
@@ -484,9 +487,9 @@ DiscreteRange<T>::intersection(DiscreteRange::self_type const &that) const {
     Two intervals are equal if their min and max values are equal.
     @relates interval
  */
-template <typename T>
+template<typename T>
 bool
-operator==(DiscreteRange<T> const &lhs, DiscreteRange<T> const &rhs) {
+operator==(DiscreteRange<T> const& lhs, DiscreteRange<T> const& rhs) {
   return lhs.min() == rhs.min() && lhs.max() == rhs.max();
 }
 
@@ -494,9 +497,9 @@ operator==(DiscreteRange<T> const &lhs, DiscreteRange<T> const &rhs) {
     Two intervals are equal if their min and max values are equal.
     @relates interval
  */
-template <typename T>
+template<typename T>
 bool
-operator!=(DiscreteRange<T> const &lhs, DiscreteRange<T> const &rhs) {
+operator!=(DiscreteRange<T> const& lhs, DiscreteRange<T> const& rhs) {
   return !(lhs == rhs);
 }
 
@@ -510,9 +513,9 @@ operator!=(DiscreteRange<T> const &lhs, DiscreteRange<T> const &rhs) {
     - ^ at least looks like "intersects"
     @relates interval
  */
-template <typename T>
+template<typename T>
 bool
-operator^(DiscreteRange<T> const &lhs, DiscreteRange<T> const &rhs) {
+operator^(DiscreteRange<T> const& lhs, DiscreteRange<T> const& rhs) {
   return lhs.has_intersection(rhs);
 }
 
@@ -521,9 +524,9 @@ operator^(DiscreteRange<T> const &lhs, DiscreteRange<T> const &rhs) {
     @note Equivalent to @c is_strict_subset.
     @relates interval
  */
-template <typename T>
+template<typename T>
 inline bool
-operator<(DiscreteRange<T> const &lhs, DiscreteRange<T> const &rhs) {
+operator<(DiscreteRange<T> const& lhs, DiscreteRange<T> const& rhs) {
   return rhs.is_strict_superset_of(lhs);
 }
 
@@ -532,9 +535,9 @@ operator<(DiscreteRange<T> const &lhs, DiscreteRange<T> const &rhs) {
     @note Equivalent to @c is_subset.
     @relates interval
  */
-template <typename T>
+template<typename T>
 inline bool
-operator<=(DiscreteRange<T> const &lhs, DiscreteRange<T> const &rhs) {
+operator<=(DiscreteRange<T> const& lhs, DiscreteRange<T> const& rhs) {
   return rhs.is_superset_of(lhs);
 }
 
@@ -543,9 +546,9 @@ operator<=(DiscreteRange<T> const &lhs, DiscreteRange<T> const &rhs) {
     @note Equivalent to @c is_strict_superset.
     @relates interval
  */
-template <typename T>
+template<typename T>
 inline bool
-operator>(DiscreteRange<T> const &lhs, DiscreteRange<T> const &rhs) {
+operator>(DiscreteRange<T> const& lhs, DiscreteRange<T> const& rhs) {
   return lhs.is_strict_superset_of(rhs);
 }
 
@@ -554,9 +557,9 @@ operator>(DiscreteRange<T> const &lhs, DiscreteRange<T> const &rhs) {
     @note Equivalent to @c is_superset.
     @relates interval
     */
-template <typename T>
+template<typename T>
 inline bool
-operator>=(DiscreteRange<T> const &lhs, DiscreteRange<T> const &rhs) {
+operator>=(DiscreteRange<T> const& lhs, DiscreteRange<T> const& rhs) {
   return lhs.is_superset_of(rhs);
 }
 
@@ -572,7 +575,7 @@ operator>=(DiscreteRange<T> const &lhs, DiscreteRange<T> const &rhs) {
  * @c METRIC must be
  * - discrete and finite valued type with increment and decrement operations.
  */
-template <typename METRIC, typename PAYLOAD> class DiscreteSpace {
+template<typename METRIC, typename PAYLOAD> class DiscreteSpace {
   using self_type = DiscreteSpace;
 
 protected:
@@ -597,38 +600,40 @@ protected:
     Node() = default; ///< Construct empty node.
 
     /// Construct from @a range and @a payload.
-    Node(range_type const &range, PAYLOAD const &payload) : _range(range), _payload(payload) {}
+    Node(range_type const& range, PAYLOAD const& payload) : _range(range), _payload(payload) {}
+
     /// Construct from two metrics and a payload
-    Node(METRIC const& min, METRIC const& max, PAYLOAD const& payload) : _range(min, max), _payload(payload) {}
+    Node(METRIC const& min, METRIC const& max, PAYLOAD const& payload)
+        : _range(min, max), _payload(payload) {}
 
     /// @return The payload in the node.
-    PAYLOAD & payload();
+    PAYLOAD& payload();
 
     /** Set the @a range of a node.
      *
      * @param range Range to use.
      * @return @a this
      */
-    self_type & assign(range_type const &range);
+    self_type& assign(range_type const& range);
 
     /** Set the @a payload for @a this node.
      *
      * @param payload Payload to use.
      * @return @a this
      */
-    self_type & assign(PAYLOAD const &payload);
+    self_type& assign(PAYLOAD const& payload);
 
     range_type const& range() const { return _range; }
 
-    self_type &
-    assign_min(METRIC const &m) {
+    self_type&
+    assign_min(METRIC const& m) {
       _range.assign_min(m);
       this->ripple_structure_fixup();
       return *this;
     }
 
-    self_type &
-    assign_max(METRIC const &m) {
+    self_type&
+    assign_max(METRIC const& m) {
       _range.assign_max(m);
       this->ripple_structure_fixup();
       return *this;
@@ -640,7 +645,7 @@ protected:
      *
      * @return @a this
      */
-    self_type &
+    self_type&
     dec_max() {
       _range.dec_max();
       this->ripple_structure_fixup();
@@ -651,6 +656,7 @@ protected:
     min() const {
       return _range.min();
     }
+
     METRIC const&
     max() const {
       return _range.max();
@@ -658,8 +664,9 @@ protected:
 
     void structure_fixup() override;
 
-    self_type * left() { return static_cast<self_type*>(_left); }
-    self_type * right() { return static_cast<self_type*>(_right); }
+    self_type *left() { return static_cast<self_type *>(_left); }
+
+    self_type *right() { return static_cast<self_type *>(_right); }
 
   };
 
@@ -675,14 +682,17 @@ protected:
   prev(Node *n) {
     return Node::Linkage::prev_ptr(n);
   }
+
   Node *
   next(Node *n) {
     return Node::Linkage::next_ptr(n);
   }
+
   Node *
   left(Node *n) {
     return static_cast<Node *>(n->_left);
   }
+
   Node *
   right(Node *n) {
     return static_cast<Node *>(n->_right);
@@ -693,6 +703,7 @@ public:
   using const_iterator = typename decltype(_list)::const_iterator;
 
   DiscreteSpace() = default;
+
   ~DiscreteSpace();
 
   /** Set the @a payload for a @a range
@@ -703,7 +714,7 @@ public:
    *
    * Values in @a range are set to @a payload regardless of the current state.
    */
-  self_type &mark(range_type const &range, PAYLOAD const &payload);
+  self_type& mark(range_type const& range, PAYLOAD const& payload);
 
   /** Erase a @a range.
    *
@@ -712,7 +723,7 @@ public:
    *
    * All values in @a range are removed from the space.
    */
-  self_type &erase(range_type const &range);
+  self_type& erase(range_type const& range);
 
   /** Blend a @a color to a @a range.
    *
@@ -730,8 +741,8 @@ public:
    * indicate whether the blend resulted in a valid color. If @c false is returned, the blended
    * region is removed from the space.
    */
-  template < typename F, typename U = PAYLOAD >
-  self_type &blend(range_type const &range, U const &color, F && blender);
+  template<typename F, typename U = PAYLOAD>
+  self_type& blend(range_type const& range, U const& color, F&& blender);
 
   /** Fill @a range with @a payload.
    *
@@ -742,24 +753,25 @@ public:
    * Values in @a range that do not have a payload are set to @a payload. Values in the space are
    * not changed.
    */
-  self_type &fill(range_type const &range, PAYLOAD const &payload);
+  self_type& fill(range_type const& range, PAYLOAD const& payload);
 
   /** Find the payload at @a metric.
    *
    * @param metric The metric for which to search.
    * @return The payload for @a metric if found, @c nullptr if not found.
    */
-  iterator find(METRIC const &metric);
+  iterator find(METRIC const& metric);
 
   /// @return The number of distinct ranges.
   size_t count() const;
 
   iterator begin() { return _list.begin(); }
+
   iterator end() { return _list.end(); }
 
   /// Remove all ranges.
   void clear() {
-    for (auto &node : _list) {
+    for (auto& node : _list) {
       std::destroy_at(&node.payload());
     }
     _list.clear();
@@ -775,10 +787,10 @@ protected:
    * @return The rightmost range that starts at or before @a target, or @c nullptr if all ranges start
    * after @a target.
    */
-  Node *lower_bound(METRIC const &target);
+  Node *lower_bound(METRIC const& target);
 
   /// @return The first node in the tree.
-  Node * head();
+  Node *head();
 
   /** Insert @a node before @a spot.
    *
@@ -808,22 +820,22 @@ protected:
 
 // ---
 
-template <typename METRIC, typename PAYLOAD>
-PAYLOAD &
+template<typename METRIC, typename PAYLOAD>
+PAYLOAD&
 DiscreteSpace<METRIC, PAYLOAD>::Node::payload() {
   return _payload;
 }
 
-template <typename METRIC, typename PAYLOAD>
+template<typename METRIC, typename PAYLOAD>
 auto
-DiscreteSpace<METRIC, PAYLOAD>::Node::assign(DiscreteSpace::range_type const &range) -> self_type &{
+DiscreteSpace<METRIC, PAYLOAD>::Node::assign(DiscreteSpace::range_type const& range) -> self_type& {
   _range = range;
   return *this;
 }
 
-template <typename METRIC, typename PAYLOAD>
+template<typename METRIC, typename PAYLOAD>
 auto
-DiscreteSpace<METRIC, PAYLOAD>::Node::assign(PAYLOAD const &payload) -> self_type & {
+DiscreteSpace<METRIC, PAYLOAD>::Node::assign(PAYLOAD const& payload) -> self_type& {
   _payload = payload;
   return *this;
 }
@@ -845,26 +857,26 @@ void DiscreteSpace<METRIC, PAYLOAD>::Node::structure_fixup() {
 
 // ---
 
-template <typename METRIC, typename PAYLOAD>
+template<typename METRIC, typename PAYLOAD>
 DiscreteSpace<METRIC, PAYLOAD>::~DiscreteSpace() {
   // Destruct all the payloads - the nodes themselves are in the arena and disappear with it.
-  for (auto &node : _list) {
+  for (auto& node : _list) {
     std::destroy_at(&node.payload());
   }
 }
 
-template <typename METRIC, typename PAYLOAD>
+template<typename METRIC, typename PAYLOAD>
 size_t DiscreteSpace<METRIC, PAYLOAD>::count() const { return _list.count(); }
 
-template <typename METRIC, typename PAYLOAD>
+template<typename METRIC, typename PAYLOAD>
 auto
-DiscreteSpace<METRIC, PAYLOAD>::head() -> Node *{
+DiscreteSpace<METRIC, PAYLOAD>::head() -> Node * {
   return static_cast<Node *>(_list.head());
 }
 
-template <typename METRIC, typename PAYLOAD>
+template<typename METRIC, typename PAYLOAD>
 auto
-DiscreteSpace<METRIC, PAYLOAD>::find(METRIC const &metric) -> iterator {
+DiscreteSpace<METRIC, PAYLOAD>::find(METRIC const& metric) -> iterator {
   auto n = _root; // current node to test.
   while (n) {
     if (metric < n->min()) {
@@ -886,9 +898,9 @@ DiscreteSpace<METRIC, PAYLOAD>::find(METRIC const &metric) -> iterator {
   return this->end();
 }
 
-template <typename METRIC, typename PAYLOAD>
-auto DiscreteSpace<METRIC, PAYLOAD>::lower_bound(METRIC const &target) -> Node * {
-  Node *n    = _root;   // current node to test.
+template<typename METRIC, typename PAYLOAD>
+auto DiscreteSpace<METRIC, PAYLOAD>::lower_bound(METRIC const& target) -> Node * {
+  Node *n = _root;   // current node to test.
   Node *zret = nullptr; // best node so far.
   while (n) {
     if (target < n->min()) {
@@ -926,9 +938,10 @@ void DiscreteSpace<METRIC, PAYLOAD>::append(DiscreteSpace::Node *node) {
   _list.append(node);
 }
 
-template <typename METRIC, typename PAYLOAD>
+template<typename METRIC, typename PAYLOAD>
 void
-DiscreteSpace<METRIC, PAYLOAD>::insert_before(DiscreteSpace::Node *spot, DiscreteSpace::Node *node) {
+DiscreteSpace<METRIC, PAYLOAD>::insert_before(DiscreteSpace::Node *spot
+                                              , DiscreteSpace::Node *node) {
   if (left(spot) == nullptr) {
     spot->set_child(node, Direction::LEFT);
   } else {
@@ -942,7 +955,7 @@ DiscreteSpace<METRIC, PAYLOAD>::insert_before(DiscreteSpace::Node *spot, Discret
   _root = static_cast<Node *>(node->rebalance_after_insert());
 }
 
-template <typename METRIC, typename PAYLOAD>
+template<typename METRIC, typename PAYLOAD>
 void
 DiscreteSpace<METRIC, PAYLOAD>::insert_after(DiscreteSpace::Node *spot, DiscreteSpace::Node *node) {
   if (right(spot) == nullptr) {
@@ -958,9 +971,10 @@ DiscreteSpace<METRIC, PAYLOAD>::insert_after(DiscreteSpace::Node *spot, Discrete
   _root = static_cast<Node *>(node->rebalance_after_insert());
 }
 
-template <typename METRIC, typename PAYLOAD>
-DiscreteSpace<METRIC, PAYLOAD> &
-DiscreteSpace<METRIC, PAYLOAD>::mark(DiscreteSpace::range_type const &range, PAYLOAD const &payload) {
+template<typename METRIC, typename PAYLOAD>
+DiscreteSpace<METRIC, PAYLOAD>&
+DiscreteSpace<METRIC, PAYLOAD>::mark(DiscreteSpace::range_type const& range
+                                     , PAYLOAD const& payload) {
   Node *n = this->lower_bound(range.min()); // current node.
   Node *x = nullptr;                       // New node, gets set if we re-use an existing one.
   Node *y = nullptr;                       // Temporary for removing and advancing.
@@ -1042,7 +1056,7 @@ DiscreteSpace<METRIC, PAYLOAD>::mark(DiscreteSpace::range_type const &range, PAY
   } else if (nullptr != (n = this->head()) &&                  // at least one node in tree.
              n->payload() == payload &&                            // payload matches
              (n->max() <= range.max() || n->min() <= max_plus_1) // overlap or adj.
-  ) {
+      ) {
     // Same payload with overlap, re-use.
     x = n;
     n = next(n);
@@ -1080,9 +1094,10 @@ DiscreteSpace<METRIC, PAYLOAD>::mark(DiscreteSpace::range_type const &range, PAY
   return *this;
 }
 
-template <typename METRIC, typename PAYLOAD>
-DiscreteSpace<METRIC, PAYLOAD> &
-DiscreteSpace<METRIC, PAYLOAD>::fill(DiscreteSpace::range_type const &range, PAYLOAD const &payload) {
+template<typename METRIC, typename PAYLOAD>
+DiscreteSpace<METRIC, PAYLOAD>&
+DiscreteSpace<METRIC, PAYLOAD>::fill(DiscreteSpace::range_type const& range
+                                     , PAYLOAD const& payload) {
   // Rightmost node of interest with n->_min <= min.
   Node *n = this->lower_bound(range.min());
   Node *x = nullptr; // New node (if any).
@@ -1165,7 +1180,7 @@ DiscreteSpace<METRIC, PAYLOAD>::fill(DiscreteSpace::range_type const &range, PAY
           return *this;
         } else { // n is contained in range, skip over it.
           x->assign_max(n->_min).dec_max();
-          x   = nullptr;
+          x = nullptr;
           min = n->_max;
           ++min; // OK because n->_max maximal => next is null.
           n = next(n);
@@ -1202,14 +1217,14 @@ DiscreteSpace<METRIC, PAYLOAD>::fill(DiscreteSpace::range_type const &range, PAY
 template<typename METRIC, typename PAYLOAD>
 template<typename F, typename U>
 auto
-DiscreteSpace<METRIC, PAYLOAD>::blend(DiscreteSpace::range_type const&range, U const& color
-                                      , F &&blender) -> self_type & {
+DiscreteSpace<METRIC, PAYLOAD>::blend(DiscreteSpace::range_type const& range, U const& color
+                                      , F&& blender) -> self_type& {
   // Do a base check for the color to use on unmapped values. If self blending on @a color
   // is @c false, then do not color currently unmapped values.
   auto plain_color = PAYLOAD{};
   bool plain_color_p = blender(plain_color, color);
 
-  auto node_cleaner = [&] (Node * ptr) -> void { _fa.destroy(ptr); };
+  auto node_cleaner = [&](Node *ptr) -> void { _fa.destroy(ptr); };
   // Used to hold a temporary blended node - @c release if put in space, otherwise cleaned up.
   using unique_node = std::unique_ptr<Node, decltype(node_cleaner)>;
 
@@ -1237,14 +1252,14 @@ DiscreteSpace<METRIC, PAYLOAD>::blend(DiscreteSpace::range_type const&range, U c
     }
     // Invariant - n->max() >= remaining.min();
 
-    Node* pred = prev(n);
+    Node *pred = prev(n);
 
     // Check for left extension. If found, clip that node to be adjacent and put in a
     // temporary that covers the overlap with the original payload.
     if (n->min() < remaining.min()) {
       // @a fill is inserted iff n->max() < remaining.max(), in which case the max is correct.
       // This is needed in other cases only for the color blending result.
-      unique_node fill { _fa.make(remaining.min(), n->max(), n->payload()), node_cleaner };
+      unique_node fill{_fa.make(remaining.min(), n->max(), n->payload()), node_cleaner};
       bool fill_p = blender(fill->payload(), color); // fill or clear?
 
       if (fill_p) {
@@ -1253,7 +1268,7 @@ DiscreteSpace<METRIC, PAYLOAD>::blend(DiscreteSpace::range_type const&range, U c
           return *this; // incoming range is completely covered by @a n in the same color, done.
         }
         remaining.assign_min(++metric_type(n->max())); // going to fill up n->max(), clip target.
-        if (! same_color_p) {
+        if (!same_color_p) {
           n->assign_max(--metric_type(remaining.min())); // clip @a n down.
           this->insert_after(n, fill.get()); // add intersection node in different color.
           n = fill.release(); // skip to use new node as current node.
@@ -1340,8 +1355,8 @@ DiscreteSpace<METRIC, PAYLOAD>::blend(DiscreteSpace::range_type const&range, U c
     // Invariant: Space in @a range and to the left of @a n has been filled.
 
     // Create a node with the blend for the overlap and then update / replace @a n as needed.
-    auto max { right_ext_p ? remaining.max() : n->max() }; // smallest boundary of range and @a n.
-    unique_node fill { _fa.make(n->min(), max, n->payload()), node_cleaner };
+    auto max{right_ext_p ? remaining.max() : n->max()}; // smallest boundary of range and @a n.
+    unique_node fill{_fa.make(n->min(), max, n->payload()), node_cleaner};
     bool fill_p = blender(fill->payload(), color); // fill or clear?
     auto next_n = next(n); // cache this in case @a n is removed.
     remaining.assign_min(++METRIC{fill->max()}); // Update what is left to fill.
@@ -1358,7 +1373,8 @@ DiscreteSpace<METRIC, PAYLOAD>::blend(DiscreteSpace::range_type const&range, U c
         return *this; // @a n extends past @a remaining, -> all done.
       } else {
         // Collapse in to previous range if it's adjacent and the color matches.
-        if (nullptr != (pred = prev(n)) && pred->range().is_left_adjacent_to(fill->range()) && pred->payload() == fill->payload()) {
+        if (nullptr != (pred = prev(n)) && pred->range().is_left_adjacent_to(fill->range()) &&
+            pred->payload() == fill->payload()) {
           this->remove(n);
           pred->assign_max(fill->max());
         } else {
@@ -1379,7 +1395,7 @@ DiscreteSpace<METRIC, PAYLOAD>::blend(DiscreteSpace::range_type const&range, U c
 
   // Arriving here means there are no more ranges past @a range (those cases return from the loop).
   // Therefore the final fill node is always last in the tree.
-  if (plain_color_p && ! remaining.empty()) {
+  if (plain_color_p && !remaining.empty()) {
     // Check if the last node can be extended to cover because it's left adjacent.
     // Can decrement @a range_min because if there's a range to the left, @a range_min is not minimal.
     n = _list.tail();
@@ -1393,4 +1409,4 @@ DiscreteSpace<METRIC, PAYLOAD>::blend(DiscreteSpace::range_type const&range, U c
   return *this;
 }
 
-} // namespace SWOC_NAMESPACE
+}} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/Errata.h b/swoc++/include/swoc/Errata.h
index ccaea5c..261cbff 100644
--- a/swoc++/include/swoc/Errata.h
+++ b/swoc++/include/swoc/Errata.h
@@ -46,8 +46,7 @@
 #include "swoc/bwf_base.h"
 #include "swoc/IntrusiveDList.h"
 
-namespace SWOC_NAMESPACE
-{
+namespace swoc { inline namespace SWOC_VERSION_NS {
 /// Severity levels for Errata.
 enum class Severity : uint8_t {
   DIAG,  ///< Diagnostic (internal use).
@@ -860,7 +859,7 @@ BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, Errata::Annotatio
 
 BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, Errata const &);
 
-} // namespace SWOC_NAMESPACE
+}} // namespace SWOC_NAMESPACE
 
 // Tuple / structured binding support.
 namespace std
@@ -881,17 +880,16 @@ template <typename R> class tuple_size<swoc::Rv<R>> : public std::integral_const
 
 } // namespace std
 
-namespace SWOC_NAMESPACE
-{
+namespace swoc { inline namespace SWOC_VERSION_NS {
 // Not sure how much of this is needed, but experimentally all of these were needed in one
 // use case or another of structured binding. I wasn't able to make this work if this was
 // defined in namespace @c std. Also, because functions can't be partially specialized, it is
 // necessary to use @c constexpr @c if to handle the case. This should roll up nicely when
 // compiled.
 
-template <size_t IDX, typename R>
-typename std::tuple_element<IDX, swoc::Rv<R>>::type &
-get(swoc::Rv<R> &&rv) {
+template<size_t IDX, typename R>
+typename std::tuple_element<IDX, swoc::Rv<R>>::type&
+get(swoc::Rv<R>&& rv) {
   if constexpr (IDX == 0) {
     return rv.result();
   } else if constexpr (IDX == 1) {
@@ -899,9 +897,9 @@ get(swoc::Rv<R> &&rv) {
   }
 }
 
-template <size_t IDX, typename R>
-typename std::tuple_element<IDX, swoc::Rv<R>>::type &
-get(swoc::Rv<R> &rv) {
+template<size_t IDX, typename R>
+typename std::tuple_element<IDX, swoc::Rv<R>>::type&
+get(swoc::Rv<R>& rv) {
   if constexpr (IDX == 0) {
     return rv.result();
   } else if constexpr (IDX == 1) {
@@ -909,9 +907,9 @@ get(swoc::Rv<R> &rv) {
   }
 }
 
-template <size_t IDX, typename R>
-typename std::tuple_element<IDX, swoc::Rv<R>>::type const &
-get(swoc::Rv<R> const &rv) {
+template<size_t IDX, typename R>
+typename std::tuple_element<IDX, swoc::Rv<R>>::type const&
+get(swoc::Rv<R> const& rv) {
   if constexpr (IDX == 0) {
     return rv.result();
   } else if constexpr (IDX == 1) {
@@ -919,4 +917,4 @@ get(swoc::Rv<R> const &rv) {
   }
 }
 
-} // namespace SWOC_NAMESPACE
+}} // namespace swoc
diff --git a/swoc++/include/swoc/IntrusiveDList.h b/swoc++/include/swoc/IntrusiveDList.h
index 7487057..132b61c 100644
--- a/swoc++/include/swoc/IntrusiveDList.h
+++ b/swoc++/include/swoc/IntrusiveDList.h
@@ -18,8 +18,7 @@
 
 #include "swoc/swoc_version.h"
 
-namespace SWOC_NAMESPACE
-{
+namespace swoc { inline namespace SWOC_VERSION_NS {
 /** Intrusive doubly linked list container.
 
     This holds items in a doubly linked list using links in the items. Items are placed in the list
@@ -69,7 +68,7 @@ namespace SWOC_NAMESPACE
     between item pointers and iterators.
 
   */
-template <typename L> class IntrusiveDList {
+template<typename L> class IntrusiveDList {
   friend class iterator;
 
 public:
@@ -79,7 +78,7 @@ public:
   // qualifiers. @c nullptr is used instead of the pointer type because this is done precisely
   // to find that type.
   using value_type = typename std::remove_pointer<
-    typename std::remove_reference<typename std::invoke_result<decltype(L::next_ptr), nullptr_t>::type>::type>::type;
+      typename std::remove_reference<typename std::invoke_result<decltype(L::next_ptr), nullptr_t>::type>::type>::type;
 
   /// Const iterator.
   class const_iterator {
@@ -92,7 +91,7 @@ public:
     // STL algorithm compliance.
     using iterator_category = std::bidirectional_iterator_tag;
     using pointer           = value_type *;
-    using reference         = value_type &;
+    using reference         = value_type&;
     using difference_type   = int;
 
     /// Default constructor.
@@ -101,12 +100,12 @@ public:
     /// Pre-increment.
     /// Move to the next element in the list.
     /// @return The iterator.
-    self_type &operator++();
+    self_type& operator++();
 
     /// Pre-decrement.
     /// Move to the previous element in the list.
     /// @return The iterator.
-    self_type &operator--();
+    self_type& operator--();
 
     /// Post-increment.
     /// Move to the next element in the list.
@@ -120,7 +119,7 @@ public:
 
     /// Dereference.
     /// @return A reference to the referent.
-    value_type &operator*() const;
+    value_type& operator*() const;
 
     /// Dereference.
     /// @return A pointer to the referent.
@@ -132,10 +131,10 @@ public:
     operator value_type *() const;
 
     /// Equality
-    bool operator==(self_type const &that) const;
+    bool operator==(self_type const& that) const;
 
     /// Inequality
-    bool operator!=(self_type const &that) const;
+    bool operator!=(self_type const& that) const;
 
     /// Check if @c std::prev would be valid.
     /// @return @c true if calling @c std::prev would yield a valid iterator.
@@ -181,7 +180,7 @@ public:
     // STL algorithm compliance.
     using iterator_category = std::bidirectional_iterator_tag;
     using pointer           = value_type *;
-    using reference         = value_type &;
+    using reference         = value_type&;
 
     /// Default constructor.
     iterator();
@@ -189,12 +188,12 @@ public:
     /// Pre-increment.
     /// Move to the next element in the list.
     /// @return The iterator.
-    self_type &operator++();
+    self_type& operator++();
 
     /// Pre-decrement.
     /// Move to the previous element in the list.
     /// @return The iterator.
-    self_type &operator--();
+    self_type& operator--();
 
     /// Post-increment.
     /// Move to the next element in the list.
@@ -208,7 +207,7 @@ public:
 
     /// Dereference.
     /// @return A reference to the referent.
-    value_type &operator*() const;
+    value_type& operator*() const;
 
     /// Dereference.
     /// @return A pointer to the referent.
@@ -227,15 +226,16 @@ public:
   /// Construct to empty list.
   IntrusiveDList() = default;
 
-  IntrusiveDList(self_type const &that) = delete;
+  IntrusiveDList(self_type const& that) = delete;
 
   /// Move list to @a this and leave @a that empty.
-  IntrusiveDList(self_type &&that);
+  IntrusiveDList(self_type&& that);
 
   /// No copy assignment because items can't be in two lists and can't copy items.
-  self_type &operator=(const self_type &that) = delete;
+  self_type& operator=(const self_type& that) = delete;
+
   /// Move @a that to @a this.
-  self_type &operator=(self_type &&that);
+  self_type& operator=(self_type&& that);
 
   /// Empty check.
   /// @return @c true if the list is empty.
@@ -247,11 +247,11 @@ public:
 
   /// Add @a elt as the first element in the list.
   /// @return This container.
-  self_type &prepend(value_type *v);
+  self_type& prepend(value_type *v);
 
   /// Add @a elt as the last element in the list.
   /// @return This container.
-  self_type &append(value_type *v);
+  self_type& append(value_type *v);
 
   /// Remove the first element of the list.
   /// @return A poiner to the removed item, or @c nullptr if the list was empty.
@@ -264,22 +264,22 @@ public:
   /// Insert a new element @a elt after @a target.
   /// The caller is responsible for ensuring @a target is in this list and @a elt is not in a list.
   /// @return This list.
-  self_type &insert_after(value_type *target, value_type *v);
+  self_type& insert_after(value_type *target, value_type *v);
 
   /// Insert a new element @a v before @a target.
   /// The caller is responsible for ensuring @a target is in this list and @a elt is not in a list.
   /// @return This list.
-  self_type &insert_before(value_type *target, value_type *v);
+  self_type& insert_before(value_type *target, value_type *v);
 
   /// Insert a new element @a elt after @a target.
   /// If @a target is the end iterator, @a v is appended to the list.
   /// @return This list.
-  self_type &insert_after(iterator const &target, value_type *v);
+  self_type& insert_after(iterator const& target, value_type *v);
 
   /// Insert a new element @a v before @a target.
   /// If @a target is the end iterator, @a v is appended to the list.
   /// @return This list.
-  self_type &insert_before(iterator const &target, value_type *v);
+  self_type& insert_before(iterator const& target, value_type *v);
 
   /// Take @a v out of this list.
   /// @return The element after @a v.
@@ -287,17 +287,17 @@ public:
 
   /// Take the element at @a loc out of this list.
   /// @return Iterator for the next element.
-  iterator erase(const iterator &loc);
+  iterator erase(const iterator& loc);
 
   /// Take elements out of the list.
   /// Remove elements start with @a start up to but not including @a limit.
   /// @return @a limit
-  iterator erase(const iterator &start, const iterator &limit);
+  iterator erase(const iterator& start, const iterator& limit);
 
   /// Remove all elements.
   /// @note @b No memory management is done!
   /// @return This container.
-  self_type &clear();
+  self_type& clear();
 
   /// @return Number of elements in the list.
   size_t count() const;
@@ -323,20 +323,23 @@ public:
    * @return An @c iterator that refers to @a v.
    */
   iterator iterator_for(value_type *v);
+
   const_iterator iterator_for(const value_type *v) const;
 
   /// Get the first element.
   value_type *head();
+
   const value_type *head() const;
 
   /// Get the last element.
   value_type *tail();
+
   const value_type *tail() const;
 
   /** Apply a functor to every element in the list.
    * This iterates over the list correctly even if the functor destroys or removes elements.
    */
-  template <typename F> self_type &apply(F &&f);
+  template<typename F> self_type& apply(F&& f);
 
 protected:
   value_type *_head{nullptr}; ///< First element in list.
@@ -364,17 +367,18 @@ protected:
  *   using Linkage = swoc::IntrusiveLinkage<Thing>;
  * @endcode
  */
-template <typename T, T *(T::*NEXT) = &T::_next, T *(T::*PREV) = &T::_prev> struct IntrusiveLinkage {
-  static T *&next_ptr(T *thing); ///< Retrieve reference to next pointer.
-  static T *&prev_ptr(T *thing); ///< Retrive reference to previous pointer.
+template<typename T, T *(T::*NEXT) = &T::_next, T *(T::*PREV) = &T::_prev> struct IntrusiveLinkage {
+  static T *& next_ptr(T *thing); ///< Retrieve reference to next pointer.
+  static T *& prev_ptr(T *thing); ///< Retrive reference to previous pointer.
 };
 
-template <typename T, T *(T::*NEXT), T *(T::*PREV)>
+template<typename T, T *(T::*NEXT), T *(T::*PREV)>
 T *&
 IntrusiveLinkage<T, NEXT, PREV>::next_ptr(T *thing) {
   return thing->*NEXT;
 }
-template <typename T, T *(T::*NEXT), T *(T::*PREV)>
+
+template<typename T, T *(T::*NEXT), T *(T::*PREV)>
 T *&
 IntrusiveLinkage<T, NEXT, PREV>::prev_ptr(T *thing) {
   return thing->*PREV;
@@ -406,9 +410,9 @@ IntrusiveLinkage<T, NEXT, PREV>::prev_ptr(T *thing) {
  * This is both convenient and gets around aliasing warnings from the compiler that can arise from
  * using @c reinterpret_cast.
  */
-template <typename T, typename P>
+template<typename T, typename P>
 T *&
-ptr_ref_cast(P *&p) {
+ptr_ref_cast(P *& p) {
   union {
     P **_p;
     T **_t;
@@ -436,18 +440,18 @@ ptr_ref_cast(P *&p) {
  *   using Linkage = swoc::IntrusiveLinkage<Thing>;
  * @endcode
  */
-template <typename T, typename L> struct IntrusiveLinkageRebind {
-  static T *&next_ptr(T *thing); ///< Retrieve reference to next pointer.
-  static T *&prev_ptr(T *thing); ///< Retrive reference to previous pointer.
+template<typename T, typename L> struct IntrusiveLinkageRebind {
+  static T *& next_ptr(T *thing); ///< Retrieve reference to next pointer.
+  static T *& prev_ptr(T *thing); ///< Retrive reference to previous pointer.
 };
 
-template <typename T, typename L>
+template<typename T, typename L>
 T *&
 IntrusiveLinkageRebind<T, L>::next_ptr(T *thing) {
   return ptr_ref_cast<T>(L::next_ptr(thing));
 }
 
-template <typename T, typename L>
+template<typename T, typename L>
 T *&
 IntrusiveLinkageRebind<T, L>::prev_ptr(T *thing) {
   return ptr_ref_cast<T>(L::prev_ptr(thing));
@@ -455,31 +459,32 @@ IntrusiveLinkageRebind<T, L>::prev_ptr(T *thing) {
 
 // --- Implementation ---
 
-template <typename L> IntrusiveDList<L>::const_iterator::const_iterator() {}
+template<typename L> IntrusiveDList<L>::const_iterator::const_iterator() {}
 
-template <typename L>
+template<typename L>
 IntrusiveDList<L>::const_iterator::const_iterator(const list_type *list, value_type *v)
-  : _list(const_cast<list_type *>(list)), _v(const_cast<typename list_type::value_type *>(v)) {}
+    : _list(const_cast<list_type *>(list)), _v(const_cast<typename list_type::value_type *>(v)) {}
 
-template <typename L> IntrusiveDList<L>::iterator::iterator() {}
+template<typename L> IntrusiveDList<L>::iterator::iterator() {}
 
-template <typename L> IntrusiveDList<L>::iterator::iterator(list_type *list, value_type *v) : super_type(list, v) {}
+template<typename L>
+IntrusiveDList<L>::iterator::iterator(list_type *list, value_type *v) : super_type(list, v) {}
 
-template <typename L>
+template<typename L>
 auto
-IntrusiveDList<L>::const_iterator::operator++() -> self_type & {
+IntrusiveDList<L>::const_iterator::operator++() -> self_type& {
   _v = L::next_ptr(_v);
   return *this;
 }
 
-template <typename L>
+template<typename L>
 auto
-IntrusiveDList<L>::iterator::operator++() -> self_type & {
+IntrusiveDList<L>::iterator::operator++() -> self_type& {
   this->super_type::operator++();
   return *this;
 }
 
-template <typename L>
+template<typename L>
 auto
 IntrusiveDList<L>::const_iterator::operator++(int) -> self_type {
   self_type tmp(*this);
@@ -487,7 +492,7 @@ IntrusiveDList<L>::const_iterator::operator++(int) -> self_type {
   return tmp;
 }
 
-template <typename L>
+template<typename L>
 auto
 IntrusiveDList<L>::iterator::operator++(int) -> self_type {
   self_type tmp(*this);
@@ -495,25 +500,23 @@ IntrusiveDList<L>::iterator::operator++(int) -> self_type {
   return tmp;
 }
 
-template <typename L>
+template<typename L>
 auto
-IntrusiveDList<L>::const_iterator::operator--() -> self_type & {
-  if (_v)
-  {
+IntrusiveDList<L>::const_iterator::operator--() -> self_type& {
+  if (_v) {
     _v = L::prev_ptr(_v);
-  } else if (_list)
-  { _v = _list->_tail; }
+  } else if (_list) { _v = _list->_tail; }
   return *this;
 }
 
-template <typename L>
+template<typename L>
 auto
-IntrusiveDList<L>::iterator::operator--() -> self_type & {
+IntrusiveDList<L>::iterator::operator--() -> self_type& {
   this->super_type::operator--();
   return *this;
 }
 
-template <typename L>
+template<typename L>
 auto
 IntrusiveDList<L>::const_iterator::operator--(int) -> self_type {
   self_type tmp(*this);
@@ -521,7 +524,7 @@ IntrusiveDList<L>::const_iterator::operator--(int) -> self_type {
   return tmp;
 }
 
-template <typename L>
+template<typename L>
 auto
 IntrusiveDList<L>::iterator::operator--(int) -> self_type {
   self_type tmp(*this);
@@ -529,74 +532,74 @@ IntrusiveDList<L>::iterator::operator--(int) -> self_type {
   return tmp;
 }
 
-template <typename L> auto IntrusiveDList<L>::const_iterator::operator-> () const -> value_type * {
+template<typename L> auto IntrusiveDList<L>::const_iterator::operator->() const -> value_type * {
   return _v;
 }
 
-template <typename L> auto IntrusiveDList<L>::iterator::operator-> () const -> value_type * {
+template<typename L> auto IntrusiveDList<L>::iterator::operator->() const -> value_type * {
   return super_type::_v;
 }
 
-template <typename L> IntrusiveDList<L>::const_iterator::operator value_type *() const {
+template<typename L> IntrusiveDList<L>::const_iterator::operator value_type *() const {
   return _v;
 }
 
-template <typename L> auto IntrusiveDList<L>::const_iterator::operator*() const -> value_type & {
+template<typename L> auto IntrusiveDList<L>::const_iterator::operator*() const -> value_type& {
   return *_v;
 }
 
-template <typename L> auto IntrusiveDList<L>::iterator::operator*() const -> value_type & {
+template<typename L> auto IntrusiveDList<L>::iterator::operator*() const -> value_type& {
   return *super_type::_v;
 }
 
-template <typename L> IntrusiveDList<L>::iterator::operator value_type *() const {
+template<typename L> IntrusiveDList<L>::iterator::operator value_type *() const {
   return super_type::_v;
 }
 
 /// --- Main class
 
-template <typename L>
-IntrusiveDList<L>::IntrusiveDList(self_type &&that) : _head(that._head), _tail(that._tail), _count(that._count) {
+template<typename L>
+IntrusiveDList<L>::IntrusiveDList(self_type&& that)
+    : _head(that._head), _tail(that._tail), _count(that._count) {
   that.clear();
 }
 
-template <typename L>
+template<typename L>
 bool
 IntrusiveDList<L>::empty() const {
   return _head == nullptr;
 }
 
-template <typename L>
+template<typename L>
 bool
 IntrusiveDList<L>::contains(const value_type *v) const {
-  for (auto thing = _head; thing; thing = L::next_ptr(thing))
-  {
+  for (auto thing = _head; thing; thing = L::next_ptr(thing)) {
     if (thing == v)
       return true;
   }
   return false;
 }
 
-template <typename L>
+template<typename L>
 bool
-IntrusiveDList<L>::const_iterator::operator==(self_type const &that) const {
+IntrusiveDList<L>::const_iterator::operator==(self_type const& that) const {
   return this->_v == that._v;
 }
 
-template <typename L>
+template<typename L>
 bool
-IntrusiveDList<L>::const_iterator::operator!=(self_type const &that) const {
+IntrusiveDList<L>::const_iterator::operator!=(self_type const& that) const {
   return this->_v != that._v;
 }
 
 template<typename L>
 bool IntrusiveDList<L>::const_iterator::has_predecessor() const {
-  return _v ? nullptr != L::prev_ptr(_v) : ! _list->empty();
+  return _v ? nullptr != L::prev_ptr(_v) : !_list->empty();
 }
 
 template<typename L>
 bool IntrusiveDList<L>::const_iterator::has_prev() const {
-  return _v ? nullptr != L::prev_ptr(_v) : ! _list->empty();
+  return _v ? nullptr != L::prev_ptr(_v) : !_list->empty();
 }
 
 template<typename L>
@@ -609,15 +612,13 @@ bool IntrusiveDList<L>::const_iterator::has_next() const {
   return nullptr != _v;
 }
 
-template <typename L>
+template<typename L>
 auto
-IntrusiveDList<L>::prepend(value_type *v) -> self_type & {
+IntrusiveDList<L>::prepend(value_type *v) -> self_type& {
   L::prev_ptr(v) = nullptr;
-  if (nullptr != (L::next_ptr(v) = _head))
-  {
+  if (nullptr != (L::next_ptr(v) = _head)) {
     L::prev_ptr(_head) = v;
-  } else
-  {
+  } else {
     _tail = v; // transition empty -> non-empty
   }
   _head = v;
@@ -625,15 +626,13 @@ IntrusiveDList<L>::prepend(value_type *v) -> self_type & {
   return *this;
 }
 
-template <typename L>
+template<typename L>
 auto
-IntrusiveDList<L>::append(value_type *v) -> self_type & {
+IntrusiveDList<L>::append(value_type *v) -> self_type& {
   L::next_ptr(v) = nullptr;
-  if (nullptr != (L::prev_ptr(v) = _tail))
-  {
+  if (nullptr != (L::prev_ptr(v) = _tail)) {
     L::next_ptr(_tail) = v;
-  } else
-  {
+  } else {
     _head = v; // transition empty -> non-empty
   }
   _tail = v;
@@ -641,110 +640,92 @@ IntrusiveDList<L>::append(value_type *v) -> self_type & {
   return *this;
 }
 
-template <typename L>
+template<typename L>
 auto
 IntrusiveDList<L>::take_head() -> value_type * {
   value_type *zret = _head;
-  if (_head)
-  {
-    if (nullptr == (_head = L::next_ptr(_head)))
-    {
+  if (_head) {
+    if (nullptr == (_head = L::next_ptr(_head))) {
       _tail = nullptr; // transition non-empty -> empty
-    } else
-    { L::prev_ptr(_head) = nullptr; }
+    } else { L::prev_ptr(_head) = nullptr; }
     L::next_ptr(zret) = L::prev_ptr(zret) = nullptr;
     --_count;
   }
   return zret;
 }
 
-template <typename L>
+template<typename L>
 auto
 IntrusiveDList<L>::take_tail() -> value_type * {
   value_type *zret = _tail;
-  if (_tail)
-  {
-    if (nullptr == (_tail = L::prev_ptr(_tail)))
-    {
+  if (_tail) {
+    if (nullptr == (_tail = L::prev_ptr(_tail))) {
       _head = nullptr; // transition non-empty -> empty
-    } else
-    { L::next_ptr(_tail) = nullptr; }
+    } else { L::next_ptr(_tail) = nullptr; }
     L::next_ptr(zret) = L::prev_ptr(zret) = nullptr;
     --_count;
   }
   return zret;
 }
 
-template <typename L>
+template<typename L>
 auto
-IntrusiveDList<L>::insert_after(value_type *target, value_type *v) -> self_type & {
-  if (target)
-  {
-    if (nullptr != (L::next_ptr(v) = L::next_ptr(target)))
-    {
+IntrusiveDList<L>::insert_after(value_type *target, value_type *v) -> self_type& {
+  if (target) {
+    if (nullptr != (L::next_ptr(v) = L::next_ptr(target))) {
       L::prev_ptr(L::next_ptr(v)) = v;
-    } else if (_tail == target)
-    { _tail = v; }
-    L::prev_ptr(v)      = target;
+    } else if (_tail == target) { _tail = v; }
+    L::prev_ptr(v) = target;
     L::next_ptr(target) = v;
 
     ++_count;
-  } else
-  { this->append(v); }
+  } else { this->append(v); }
   return *this;
 }
 
-template <typename L>
+template<typename L>
 auto
-IntrusiveDList<L>::insert_after(iterator const &target, value_type *v) -> self_type & {
+IntrusiveDList<L>::insert_after(iterator const& target, value_type *v) -> self_type& {
   return this->insert_after(target._v, v);
 }
 
-template <typename L>
+template<typename L>
 auto
-IntrusiveDList<L>::insert_before(value_type *target, value_type *v) -> self_type & {
-  if (target)
-  {
-    if (nullptr != (L::prev_ptr(v) = L::prev_ptr(target)))
-    {
+IntrusiveDList<L>::insert_before(value_type *target, value_type *v) -> self_type& {
+  if (target) {
+    if (nullptr != (L::prev_ptr(v) = L::prev_ptr(target))) {
       L::next_ptr(L::prev_ptr(v)) = v;
-    } else if (target == _head)
-    { _head = v; }
-    L::next_ptr(v)      = target;
+    } else if (target == _head) { _head = v; }
+    L::next_ptr(v) = target;
     L::prev_ptr(target) = v;
 
     ++_count;
-  } else
-  { this->append(v); }
+  } else { this->append(v); }
   return *this;
 }
 
-template <typename L>
+template<typename L>
 auto
-IntrusiveDList<L>::insert_before(iterator const &target, value_type *v) -> self_type & {
+IntrusiveDList<L>::insert_before(iterator const& target, value_type *v) -> self_type& {
   return this->insert_before(target._v, v);
 }
 
-template <typename L>
+template<typename L>
 auto
 IntrusiveDList<L>::erase(value_type *v) -> value_type * {
   value_type *zret{nullptr};
 
-  if (L::prev_ptr(v))
-  {
+  if (L::prev_ptr(v)) {
     L::next_ptr(L::prev_ptr(v)) = L::next_ptr(v);
   }
-  if (L::next_ptr(v))
-  {
-    zret                        = L::next_ptr(v);
+  if (L::next_ptr(v)) {
+    zret = L::next_ptr(v);
     L::prev_ptr(L::next_ptr(v)) = L::prev_ptr(v);
   }
-  if (v == _head)
-  {
+  if (v == _head) {
     _head = L::next_ptr(v);
   }
-  if (v == _tail)
-  {
+  if (v == _tail) {
     _tail = L::prev_ptr(v);
   }
   L::prev_ptr(v) = L::next_ptr(v) = nullptr;
@@ -753,164 +734,156 @@ IntrusiveDList<L>::erase(value_type *v) -> value_type * {
   return zret;
 }
 
-template <typename L>
+template<typename L>
 auto
-IntrusiveDList<L>::erase(const iterator &loc) -> iterator {
+IntrusiveDList<L>::erase(const iterator& loc) -> iterator {
   return this->iterator_for(this->erase(loc._v));
 };
 
-template <typename L>
+template<typename L>
 auto
-IntrusiveDList<L>::erase(const iterator &first, const iterator &limit) -> iterator {
+IntrusiveDList<L>::erase(const iterator& first, const iterator& limit) -> iterator {
   value_type *spot = first;
   value_type *prev{L::prev_ptr(spot)};
-  if (prev)
-  {
+  if (prev) {
     L::next_ptr(prev) = limit;
   }
-  if (spot == _head)
-  {
+  if (spot == _head) {
     _head = limit;
   }
   // tail is only updated if @a limit is @a end (e.g., @c nullptr).
-  if (nullptr == limit)
-  {
+  if (nullptr == limit) {
     _tail = prev;
-  } else
-  { L::prev_ptr(limit) = prev; }
+  } else { L::prev_ptr(limit) = prev; }
   // Clear links in removed elements.
-  while (spot != limit)
-  {
+  while (spot != limit) {
     value_type *target{spot};
-    spot                = L::next_ptr(spot);
+    spot = L::next_ptr(spot);
     L::prev_ptr(target) = L::next_ptr(target) = nullptr;
   };
 
   return {limit._v, this};
 };
 
-template <typename L>
+template<typename L>
 auto
-IntrusiveDList<L>::operator=(self_type &&that) -> self_type & {
-  if (this != &that)
-  {
-    this->_head  = that._head;
-    this->_tail  = that._tail;
+IntrusiveDList<L>::operator=(self_type&& that) -> self_type& {
+  if (this != &that) {
+    this->_head = that._head;
+    this->_tail = that._tail;
     this->_count = that._count;
     that.clear();
   }
   return *this;
 }
 
-template <typename L>
+template<typename L>
 size_t
 IntrusiveDList<L>::count() const {
   return _count;
 };
 
-template <typename L>
+template<typename L>
 auto
 IntrusiveDList<L>::begin() const -> const_iterator {
   return const_iterator{this, _head};
 };
 
-template <typename L>
+template<typename L>
 auto
 IntrusiveDList<L>::begin() -> iterator {
   return iterator{this, _head};
 };
 
-template <typename L>
+template<typename L>
 auto
 IntrusiveDList<L>::end() const -> const_iterator {
   return const_iterator{this, nullptr};
 };
 
-template <typename L>
+template<typename L>
 auto
 IntrusiveDList<L>::end() -> iterator {
   return iterator{this, nullptr};
 };
 
-template <typename L>
+template<typename L>
 auto
 IntrusiveDList<L>::iterator_for(value_type *v) -> iterator {
   return iterator{this, v};
 };
 
-template <typename L>
+template<typename L>
 auto
 IntrusiveDList<L>::iterator_for(const value_type *v) const -> const_iterator {
   return const_iterator{this, v};
 };
 
-template <typename L>
+template<typename L>
 auto
 IntrusiveDList<L>::tail() -> value_type * {
   return _tail;
 }
 
-template <typename L>
+template<typename L>
 auto
 IntrusiveDList<L>::tail() const -> const value_type * {
   return _tail;
 }
 
-template <typename L>
+template<typename L>
 auto
 IntrusiveDList<L>::head() -> value_type * {
   return _head;
 }
 
-template <typename L>
+template<typename L>
 auto
 IntrusiveDList<L>::head() const -> const value_type * {
   return _head;
 }
 
-template <typename L>
+template<typename L>
 auto
-IntrusiveDList<L>::clear() -> self_type & {
+IntrusiveDList<L>::clear() -> self_type& {
   _head = _tail = nullptr;
-  _count        = 0;
+  _count = 0;
   return *this;
 };
 
-namespace detail
-{
-  // Make @c apply more convenient by allowing the function to take a reference type or pointer type
-  // to the container elements. The pointer type is the base, plus a shim to convert from a reference
-  // type functor to a pointer pointer type. The complex return type definition forces only one, but
-  // not both, to be valid for a particular functor. This also must be done via free functions and not
-  // method overloads because the compiler forces a match up of method definitions and declarations
-  // before any template instantiation.
-
-  template <typename L, typename F>
-  auto
-  Intrusive_DList_Apply(IntrusiveDList<L> &list, F &&f)
-    -> decltype(f(*static_cast<typename IntrusiveDList<L>::value_type *>(nullptr)), list) {
-    return list.apply([&f](typename IntrusiveDList<L>::value_type *v) { return f(*v); });
-  }
+namespace detail {
+// Make @c apply more convenient by allowing the function to take a reference type or pointer type
+// to the container elements. The pointer type is the base, plus a shim to convert from a reference
+// type functor to a pointer pointer type. The complex return type definition forces only one, but
+// not both, to be valid for a particular functor. This also must be done via free functions and not
+// method overloads because the compiler forces a match up of method definitions and declarations
+// before any template instantiation.
 
-  template <typename L, typename F>
-  auto
-  Intrusive_DList_Apply(IntrusiveDList<L> &list, F &&f)
-    -> decltype(f(static_cast<typename IntrusiveDList<L>::value_type *>(nullptr)), list) {
-    auto spot{list.begin()};
-    auto limit{list.end()};
-    while (spot != limit)
-    {
-      f(spot++); // post increment means @a spot is updated before @a f is applied.
-    }
-    return list;
+template<typename L, typename F>
+auto
+Intrusive_DList_Apply(IntrusiveDList<L>& list, F&& f)
+-> decltype(f(*static_cast<typename IntrusiveDList<L>::value_type *>(nullptr)), list) {
+  return list.apply([&f](typename IntrusiveDList<L>::value_type *v) { return f(*v); });
+}
+
+template<typename L, typename F>
+auto
+Intrusive_DList_Apply(IntrusiveDList<L>& list, F&& f)
+-> decltype(f(static_cast<typename IntrusiveDList<L>::value_type *>(nullptr)), list) {
+  auto spot{list.begin()};
+  auto limit{list.end()};
+  while (spot != limit) {
+    f(spot++); // post increment means @a spot is updated before @a f is applied.
   }
+  return list;
+}
 } // namespace detail
 
-template <typename L>
-template <typename F>
+template<typename L>
+template<typename F>
 auto
-IntrusiveDList<L>::apply(F &&f) -> self_type & {
+IntrusiveDList<L>::apply(F&& f) -> self_type& {
   return detail::Intrusive_DList_Apply(*this, f);
 };
 
-} // namespace SWOC_NAMESPACE
+}} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/IntrusiveHashMap.h b/swoc++/include/swoc/IntrusiveHashMap.h
index bed2d21..532e556 100644
--- a/swoc++/include/swoc/IntrusiveHashMap.h
+++ b/swoc++/include/swoc/IntrusiveHashMap.h
@@ -17,8 +17,7 @@
 #include "swoc/swoc_version.h"
 #include "swoc/IntrusiveDList.h"
 
-namespace SWOC_NAMESPACE
-{
+namespace swoc { inline namespace SWOC_VERSION_NS {
 /** Intrusive Hash Table.
 
     Values stored in this container are not destroyed when the container is destroyed or removed from the container.
@@ -72,7 +71,7 @@ namespace SWOC_NAMESPACE
     @endcode
 
  */
-template <typename H> class IntrusiveHashMap {
+template<typename H> class IntrusiveHashMap {
   using self_type = IntrusiveHashMap;
 
 public:
@@ -101,8 +100,8 @@ protected:
   struct Bucket {
     /// Support for IntrusiveDList<Bucket::Linkage>, definitions and link storage.
     struct Linkage {
-      static Bucket *&next_ptr(Bucket *b); ///< Access next pointer.
-      static Bucket *&prev_ptr(Bucket *b); ///< Access prev pointer.
+      static Bucket *& next_ptr(Bucket *b); ///< Access next pointer.
+      static Bucket *& prev_ptr(Bucket *b); ///< Access prev pointer.
       Bucket *_prev{nullptr};              ///< Prev pointer.
       Bucket *_next{nullptr};              ///< Next pointer.
     } _link;
@@ -148,9 +147,10 @@ public:
     // These methods enable treating the range as a view in to the hash map.
 
     /// Return @a first
-    iterator const &begin() const;
+    iterator const& begin() const;
+
     /// Return @a last
-    iterator const &end() const;
+    iterator const& end() const;
   };
 
   /// A range of constant elements in the map.
@@ -158,16 +158,17 @@ public:
     using super_type = std::pair<const_iterator, const_iterator>; ///< Super type.
 
     /// Allow implicit conversion of range to const_range.
-    const_range(range const &r);
+    const_range(range const& r);
 
     using super_type::super_type; ///< Use super type constructors.
 
     // These methods enable treating the range as a view in to the hash map.
 
     /// Return @a first
-    const_iterator const &begin() const;
+    const_iterator const& begin() const;
+
     /// Return @a last
-    const_iterator const &end() const;
+    const_iterator const& end() const;
   };
 
   /// Construct, starting with @n buckets.
@@ -179,7 +180,7 @@ public:
       The values are not cleaned up. The values are not touched in this method, therefore it is safe
       to destroy them first and then @c clear this table.
   */
-  self_type &clear();
+  self_type& clear();
 
   iterator begin();             ///< First element.
   const_iterator begin() const; ///< First element.
@@ -197,6 +198,7 @@ public:
       @return A element with a matching key, or the end iterator if not found.
   */
   const_iterator find(key_type key) const;
+
   iterator find(key_type key);
 
   /** Get an iterator for an existing value @a v.
@@ -204,6 +206,7 @@ public:
       @return An iterator that references @a v, or the end iterator if @a v is not in the table.
   */
   const_iterator find(value_type const *v) const;
+
   iterator find(value_type *v);
 
   /** Find the range of objects with keys equal to @a key.
@@ -211,6 +214,7 @@ public:
       @return A iterator pair of [first, last) items with equal keys.
   */
   const_range equal_range(key_type key) const;
+
   range equal_range(key_type key);
 
   /** Get an @c iterator for the value @a v.
@@ -219,6 +223,7 @@ public:
       this avoid containment checks, which is useful if @a v is already known to be in the container.
    */
   iterator iterator_for(value_type *v);
+
   const_iterator iterator_for(const value_type *v) const;
 
   /** Remove the value at @a loc from the table.
@@ -227,13 +232,13 @@ public:
 
       @return An iterator the next value past @a loc. [STL compatibility]
   */
-  iterator erase(iterator const &loc);
+  iterator erase(iterator const& loc);
 
   /// Remove all elements in the @c range @a r.
-  iterator erase(range const &r);
+  iterator erase(range const& r);
 
   /// Remove all elements in the range (start, limit]
-  iterator erase(iterator const &start, iterator const &limit);
+  iterator erase(iterator const& start, iterator const& limit);
 
   /// Remove a @a value from the container.
   /// @a value is checked for being a member of the container.
@@ -250,7 +255,7 @@ public:
    * @param f The function to apply.
    * @return
    */
-  template <typename F> self_type &apply(F &&f);
+  template<typename F> self_type& apply(F&& f);
 
   /** Expand the hash if needed.
 
@@ -265,13 +270,13 @@ public:
   size_t bucket_count() const;
 
   /// Set the expansion policy to @a policy.
-  self_type &set_expansion_policy(ExpansionPolicy policy);
+  self_type& set_expansion_policy(ExpansionPolicy policy);
 
   /// Get the current expansion policy
   ExpansionPolicy get_expansion_policy() const;
 
   /// Set the limit value for the expansion policy.
-  self_type &set_expansion_limit(size_t n);
+  self_type& set_expansion_limit(size_t n);
 
   /// Set the limit value for the expansion policy.
   size_t get_expansion_limit() const;
@@ -292,23 +297,21 @@ protected:
   size_t _expansion_limit{DEFAULT_EXPANSION_LIMIT};            ///< Limit value for expansion.
 
   // noncopyable
-  IntrusiveHashMap(const IntrusiveHashMap &) = delete;
-  IntrusiveHashMap &operator=(const IntrusiveHashMap &) = delete;
+  IntrusiveHashMap(const IntrusiveHashMap&) = delete;
+
+  IntrusiveHashMap& operator=(const IntrusiveHashMap&) = delete;
 
   // Hash table size prime list.
-  static constexpr std::array<size_t, 29> PRIME = {{1,        3,        7,         13,        31,       61,      127,     251,
-                                                    509,      1021,     2039,      4093,      8191,     16381,   32749,   65521,
-                                                    131071,   262139,   524287,    1048573,   2097143,  4194301, 8388593, 16777213,
-                                                    33554393, 67108859, 134217689, 268435399, 536870909}};
+  static constexpr std::array<size_t, 29> PRIME = {{1, 3, 7, 13, 31, 61, 127, 251, 509, 1021, 2039, 4093, 8191, 16381, 32749, 65521, 131071, 262139, 524287, 1048573, 2097143, 4194301, 8388593, 16777213, 33554393, 67108859, 134217689, 268435399, 536870909}};
 };
 
-template <typename H>
+template<typename H>
 auto
 IntrusiveHashMap<H>::Bucket::Linkage::next_ptr(Bucket *b) -> Bucket *& {
   return b->_link._next;
 }
 
-template <typename H>
+template<typename H>
 auto
 IntrusiveHashMap<H>::Bucket::Linkage::prev_ptr(Bucket *b) -> Bucket *& {
   return b->_link._prev;
@@ -316,103 +319,101 @@ IntrusiveHashMap<H>::Bucket::Linkage::prev_ptr(Bucket *b) -> Bucket *& {
 
 // This is designed so that if the bucket is empty, then @c nullptr is returned, which will immediately terminate
 // a search loop on an empty bucket because that will start with a nullptr candidate, matching the limit.
-template <typename H>
+template<typename H>
 auto
 IntrusiveHashMap<H>::Bucket::limit() const -> value_type * {
   Bucket *n{_link._next};
   return n ? n->_v : nullptr;
 };
 
-template <typename H>
+template<typename H>
 void
 IntrusiveHashMap<H>::Bucket::clear() {
-  _v       = nullptr;
-  _count   = 0;
+  _v = nullptr;
+  _count = 0;
   _mixed_p = false;
   // Need to clear these, or they persist after an expansion which breaks the active bucket list.
   _link._next = _link._prev = nullptr;
 }
 
-template <typename H>
+template<typename H>
 bool
 IntrusiveHashMap<H>::Bucket::contains(value_type *v) const {
-  value_type *x     = _v;
+  value_type *x = _v;
   value_type *limit = this->limit();
-  while (x != limit && x != v)
-  {
+  while (x != limit && x != v) {
     x = H::next_ptr(x);
   }
   return x == v;
 }
 
 // ---------------------
-template <typename H>
+template<typename H>
 auto
-IntrusiveHashMap<H>::range::begin() const -> iterator const & {
+IntrusiveHashMap<H>::range::begin() const -> iterator const& {
   return super_type::first;
 }
-template <typename H>
+
+template<typename H>
 auto
-IntrusiveHashMap<H>::range::end() const -> iterator const & {
+IntrusiveHashMap<H>::range::end() const -> iterator const& {
   return super_type::second;
 }
 
-template <typename H>
+template<typename H>
 auto
-IntrusiveHashMap<H>::const_range::begin() const -> const_iterator const & {
+IntrusiveHashMap<H>::const_range::begin() const -> const_iterator const& {
   return super_type::first;
 }
 
-template <typename H>
+template<typename H>
 auto
-IntrusiveHashMap<H>::const_range::end() const -> const_iterator const & {
+IntrusiveHashMap<H>::const_range::end() const -> const_iterator const& {
   return super_type::second;
 }
 
 // ---------------------
 
-template <typename H> IntrusiveHashMap<H>::IntrusiveHashMap(size_t n) {
-  if (n)
-  {
+template<typename H> IntrusiveHashMap<H>::IntrusiveHashMap(size_t n) {
+  if (n) {
     _table.resize(*std::lower_bound(PRIME.begin(), PRIME.end(), n));
   }
 }
 
-template <typename H>
+template<typename H>
 auto
 IntrusiveHashMap<H>::bucket_for(key_type key) -> Bucket * {
   return &_table[H::hash_of(key) % _table.size()];
 }
 
-template <typename H>
+template<typename H>
 auto
 IntrusiveHashMap<H>::begin() -> iterator {
   return _list.begin();
 }
 
-template <typename H>
+template<typename H>
 auto
 IntrusiveHashMap<H>::begin() const -> const_iterator {
   return _list.begin();
 }
 
-template <typename H>
+template<typename H>
 auto
 IntrusiveHashMap<H>::end() -> iterator {
   return _list.end();
 }
 
-template <typename H>
+template<typename H>
 auto
 IntrusiveHashMap<H>::end() const -> const_iterator {
   return _list.end();
 }
 
-template <typename H>
+template<typename H>
 auto
-IntrusiveHashMap<H>::clear() -> self_type & {
-  for (auto &b : _table)
-  {
+IntrusiveHashMap<H>::clear() -> self_type& {
+  for (auto& b : _table) {
     b.clear();
   }
   // Clear container data.
@@ -421,111 +422,101 @@ IntrusiveHashMap<H>::clear() -> self_type & {
   return *this;
 }
 
-template <typename H>
+template<typename H>
 auto
 IntrusiveHashMap<H>::find(key_type key) -> iterator {
-  Bucket *b         = this->bucket_for(key);
-  value_type *v     = b->_v;
+  Bucket *b = this->bucket_for(key);
+  value_type *v = b->_v;
   value_type *limit = b->limit();
-  while (v != limit && !H::equal(key, H::key_of(v)))
-  {
+  while (v != limit && !H::equal(key, H::key_of(v))) {
     v = H::next_ptr(v);
   }
   return v == limit ? _list.end() : _list.iterator_for(v);
 }
 
-template <typename H>
+template<typename H>
 auto
 IntrusiveHashMap<H>::find(key_type key) const -> const_iterator {
   return const_cast<self_type *>(this)->find(key);
 }
 
-template <typename H>
+template<typename H>
 auto
 IntrusiveHashMap<H>::equal_range(key_type key) -> range {
   iterator first{this->find(key)};
   iterator last{first};
   iterator limit{this->end()};
 
-  while (last != limit && H::equal(key, H::key_of(&*last)))
-  {
+  while (last != limit && H::equal(key, H::key_of(&*last))) {
     ++last;
   }
 
   return range{first, last};
 }
 
-template <typename H>
+template<typename H>
 auto
 IntrusiveHashMap<H>::equal_range(key_type key) const -> const_range {
   return const_cast<self_type *>(this)->equal_range(key);
 }
 
-template <typename H>
+template<typename H>
 auto
 IntrusiveHashMap<H>::iterator_for(const value_type *v) const -> const_iterator {
   return _list.iterator_for(v);
 }
 
-template <typename H>
+template<typename H>
 auto
 IntrusiveHashMap<H>::iterator_for(value_type *v) -> iterator {
   return _list.iterator_for(v);
 }
 
-template <typename H>
+template<typename H>
 auto
 IntrusiveHashMap<H>::find(value_type *v) -> iterator {
   Bucket *b = this->bucket_for(H::key_of(v));
   return b->contains(v) ? _list.iterator_for(v) : this->end();
 }
 
-template <typename H>
+template<typename H>
 auto
 IntrusiveHashMap<H>::find(value_type const *v) const -> const_iterator {
   return const_cast<self_type *>(this)->find(const_cast<value_type *>(v));
 }
 
-template <typename H>
+template<typename H>
 void
 IntrusiveHashMap<H>::insert(value_type *v) {
-  auto key         = H::key_of(v);
-  Bucket *bucket   = this->bucket_for(key);
+  auto key = H::key_of(v);
+  Bucket *bucket = this->bucket_for(key);
   value_type *spot = bucket->_v;
-  bool mixed_p     = false; // Found a different key in the bucket.
+  bool mixed_p = false; // Found a different key in the bucket.
 
-  if (nullptr == spot)
-  { // currently empty bucket, set it and add to active list.
+  if (nullptr == spot) { // currently empty bucket, set it and add to active list.
     _list.append(v);
     bucket->_v = v;
     _active_buckets.append(bucket);
-  } else
-  {
+  } else {
     value_type *limit = bucket->limit();
 
     // First search the bucket to see if the key is already in it.
-    while (spot != limit && !H::equal(key, H::key_of(spot)))
-    {
+    while (spot != limit && !H::equal(key, H::key_of(spot))) {
       spot = H::next_ptr(spot);
     }
-    if (spot != bucket->_v)
-    {
+    if (spot != bucket->_v) {
       mixed_p = true; // found some other key, it's going to be mixed.
     }
-    if (spot != limit)
-    {
+    if (spot != limit) {
       // If an equal key was found, walk past those to insert at the upper end of the range.
-      do
-      { spot = H::next_ptr(spot); } while (spot != limit && H::equal(key, H::key_of(spot)));
-      if (spot != limit)
-      { // something not equal past last equivalent, it's going to be mixed.
+      do { spot = H::next_ptr(spot); } while (spot != limit && H::equal(key, H::key_of(spot)));
+      if (spot != limit) { // something not equal past last equivalent, it's going to be mixed.
         mixed_p = true;
       }
     }
 
     _list.insert_before(spot, v);
-    if (spot == bucket->_v)
-    { // added before the bucket start, update the start.
+    if (spot == bucket->_v) { // added before the bucket start, update the start.
       bucket->_v = v;
     }
     bucket->_mixed_p = mixed_p;
@@ -534,28 +525,24 @@ IntrusiveHashMap<H>::insert(value_type *v) {
 
   // auto expand if appropriate.
   if ((AVERAGE == _expansion_policy && (_list.count() / _table.size()) > _expansion_limit) ||
-      (MAXIMUM == _expansion_policy && bucket->_count > _expansion_limit && bucket->_mixed_p))
-  {
+      (MAXIMUM == _expansion_policy && bucket->_count > _expansion_limit && bucket->_mixed_p)) {
     this->expand();
   }
 }
 
-template <typename H>
+template<typename H>
 auto
-IntrusiveHashMap<H>::erase(iterator const &loc) -> iterator {
-  value_type *v     = loc;
-  iterator zret     = ++(this->iterator_for(v)); // get around no const_iterator -> iterator.
-  Bucket *b         = this->bucket_for(H::key_of(v));
-  value_type *nv    = H::next_ptr(v);
+IntrusiveHashMap<H>::erase(iterator const& loc) -> iterator {
+  value_type *v = loc;
+  iterator zret = ++(this->iterator_for(v)); // get around no const_iterator -> iterator.
+  Bucket *b = this->bucket_for(H::key_of(v));
+  value_type *nv = H::next_ptr(v);
   value_type *limit = b->limit();
-  if (b->_v == v)
-  { // removed first element in bucket, update bucket
-    if (limit == nv)
-    { // that was also the only element, deactivate bucket
+  if (b->_v == v) { // removed first element in bucket, update bucket
+    if (limit == nv) { // that was also the only element, deactivate bucket
       _active_buckets.erase(b);
       b->clear();
-    } else
-    {
+    } else {
       b->_v = nv;
       --b->_count;
     }
@@ -564,35 +551,31 @@ IntrusiveHashMap<H>::erase(iterator const &loc) -> iterator {
   return zret;
 }
 
-template <typename H>
+template<typename H>
 bool
 IntrusiveHashMap<H>::erase(value_type *value) {
   auto loc = this->find(value);
-  if (loc != this->end())
-  {
+  if (loc != this->end()) {
     this->erase(loc);
     return true;
   }
   return false;
 }
 
-template <typename H>
+template<typename H>
 auto
-IntrusiveHashMap<H>::erase(iterator const &start, iterator const &limit) -> iterator {
+IntrusiveHashMap<H>::erase(iterator const& start, iterator const& limit) -> iterator {
   auto spot{start};
   Bucket *bucket{this->bucket_for(spot)};
-  while (spot != limit)
-  {
-    auto target         = bucket;
-    bucket              = bucket->_link._next; // bump now to avoid forward iteration problems in case of bucket removal.
+  while (spot != limit) {
+    auto target = bucket;
+    bucket = bucket->_link._next; // bump now to avoid forward iteration problems in case of bucket removal.
     value_type *v_limit = bucket ? bucket->_v : nullptr;
-    while (spot != v_limit && spot != limit)
-    {
+    while (spot != v_limit && spot != limit) {
       --(target->_count);
       ++spot;
     }
-    if (target->_count == 0)
-    {
+    if (target->_count == 0) {
       _active_buckets.erase(target);
     }
   }
@@ -600,106 +583,103 @@ IntrusiveHashMap<H>::erase(iterator const &start, iterator const &limit) -> iter
   return _list.iterator_for(limit); // convert from const_iterator back to iterator
 };
 
-template <typename H>
+template<typename H>
 auto
-IntrusiveHashMap<H>::erase(range const &r) -> iterator {
+IntrusiveHashMap<H>::erase(range const& r) -> iterator {
   return this->erase(r.first, r.second);
 }
 
-namespace detail
-{
-  // Make @c apply more convenient by allowing the function to take a reference type or pointer type to the container
-  // elements. The pointer type is the base, plus a shim to convert from a reference type functor to a pointer pointer
-  // type. The complex return type definition forces only one, but not both, to be valid for a particular functor. This
-  // also must be done via free functions and not method overloads because the compiler forces a match up of method
-  // definitions and declarations before any template instantiation.
+namespace detail {
+// Make @c apply more convenient by allowing the function to take a reference type or pointer type to the container
+// elements. The pointer type is the base, plus a shim to convert from a reference type functor to a pointer pointer
+// type. The complex return type definition forces only one, but not both, to be valid for a particular functor. This
+// also must be done via free functions and not method overloads because the compiler forces a match up of method
+// definitions and declarations before any template instantiation.
 
-  template <typename H, typename F>
-  auto
-  IntrusiveHashMapApply(IntrusiveHashMap<H> &map, F &&f)
-    -> decltype(f(*static_cast<typename IntrusiveHashMap<H>::value_type *>(nullptr)), map) {
-    return map.apply([&f](typename IntrusiveHashMap<H>::value_type *v) { return f(*v); });
-  }
+template<typename H, typename F>
+auto
+IntrusiveHashMapApply(IntrusiveHashMap<H>& map, F&& f)
+-> decltype(f(*static_cast<typename IntrusiveHashMap<H>::value_type *>(nullptr)), map) {
+  return map.apply([&f](typename IntrusiveHashMap<H>::value_type *v) { return f(*v); });
+}
 
-  template <typename H, typename F>
-  auto
-  IntrusiveHashMapApply(IntrusiveHashMap<H> &map, F &&f)
-    -> decltype(f(static_cast<typename IntrusiveHashMap<H>::value_type *>(nullptr)), map) {
-    auto spot{map.begin()};
-    auto limit{map.end()};
-    while (spot != limit)
-    {
-      f(spot++); // post increment means @a spot is updated before @a f is applied.
-    }
-    return map;
+template<typename H, typename F>
+auto
+IntrusiveHashMapApply(IntrusiveHashMap<H>& map, F&& f)
+-> decltype(f(static_cast<typename IntrusiveHashMap<H>::value_type *>(nullptr)), map) {
+  auto spot{map.begin()};
+  auto limit{map.end()};
+  while (spot != limit) {
+    f(spot++); // post increment means @a spot is updated before @a f is applied.
   }
+  return map;
+}
 } // namespace detail
 
-template <typename H>
-template <typename F>
+template<typename H>
+template<typename F>
 auto
-IntrusiveHashMap<H>::apply(F &&f) -> self_type & {
+IntrusiveHashMap<H>::apply(F&& f) -> self_type& {
   return detail::IntrusiveHashMapApply(*this, f);
 };
 
-template <typename H>
+template<typename H>
 void
 IntrusiveHashMap<H>::expand() {
   ExpansionPolicy org_expansion_policy = _expansion_policy; // save for restore.
-  value_type *old                      = _list.head();      // save for repopulating.
-  auto old_size                        = _table.size();
+  value_type *old = _list.head();      // save for repopulating.
+  auto old_size = _table.size();
 
   // Reset to empty state.
   this->clear();
   _table.resize(*std::lower_bound(PRIME.begin(), PRIME.end(), old_size + 1));
 
   _expansion_policy = MANUAL; // disable any auto expand while we're expanding.
-  while (old)
-  {
+  while (old) {
     value_type *v = old;
-    old           = H::next_ptr(old);
+    old = H::next_ptr(old);
     this->insert(v);
   }
   // stashed array gets cleaned up when @a tmp goes out of scope.
   _expansion_policy = org_expansion_policy; // reset to original value.
 }
 
-template <typename H>
+template<typename H>
 size_t
 IntrusiveHashMap<H>::count() const {
   return _list.count();
 }
 
-template <typename H>
+template<typename H>
 size_t
 IntrusiveHashMap<H>::bucket_count() const {
   return _table.size();
 }
 
-template <typename H>
+template<typename H>
 auto
-IntrusiveHashMap<H>::set_expansion_policy(ExpansionPolicy policy) -> self_type & {
+IntrusiveHashMap<H>::set_expansion_policy(ExpansionPolicy policy) -> self_type& {
   _expansion_policy = policy;
   return *this;
 }
 
-template <typename H>
+template<typename H>
 auto
 IntrusiveHashMap<H>::get_expansion_policy() const -> ExpansionPolicy {
   return _expansion_policy;
 }
 
-template <typename H>
+template<typename H>
 auto
-IntrusiveHashMap<H>::set_expansion_limit(size_t n) -> self_type & {
+IntrusiveHashMap<H>::set_expansion_limit(size_t n) -> self_type& {
   _expansion_limit = n;
   return *this;
 }
 
-template <typename H>
+template<typename H>
 size_t
 IntrusiveHashMap<H>::get_expansion_limit() const {
   return _expansion_limit;
 }
 
-} // namespace SWOC_NAMESPACE
+}} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/Lexicon.h b/swoc++/include/swoc/Lexicon.h
index f815d2d..a0d941a 100644
--- a/swoc++/include/swoc/Lexicon.h
+++ b/swoc++/include/swoc/Lexicon.h
@@ -20,25 +20,23 @@
 #include "swoc/bwf_base.h"
 #include "swoc/ext/HashFNV.h"
 
-namespace SWOC_NAMESPACE
-{
-namespace detail
-{
-  /** Create an r-value reference to a temporary formatted string.
-   *
-   * @tparam Args Format string argument types.
-   * @param fmt Format string.
-   * @param args Arguments to format string.
-   * @return r-value reference to a @c std::string containing the formatted string.
-   *
-   * This is used when throwing exceptions.
-   */
-  template <typename... Args>
-  std::string
-  what(std::string_view const &fmt, Args &&... args) {
-    std::string zret;
-    return swoc::bwprint_v(zret, fmt, std::forward_as_tuple(args...));
-  }
+namespace swoc { inline namespace SWOC_VERSION_NS {
+namespace detail {
+/** Create an r-value reference to a temporary formatted string.
+ *
+ * @tparam Args Format string argument types.
+ * @param fmt Format string.
+ * @param args Arguments to format string.
+ * @return r-value reference to a @c std::string containing the formatted string.
+ *
+ * This is used when throwing exceptions.
+ */
+template<typename... Args>
+std::string
+what(std::string_view const& fmt, Args&& ... args) {
+  std::string zret;
+  return swoc::bwprint_v(zret, fmt, std::forward_as_tuple(args...));
+}
 } // namespace detail
 
 /** A bidirectional mapping between names and enumeration values.
@@ -63,7 +61,7 @@ namespace detail
     @note All names and value must be unique across the Lexicon. All name comparisons are case
     insensitive.
  */
-template <typename E> class Lexicon {
+template<typename E> class Lexicon {
   using self_type = Lexicon; ///< Self reference type.
 
 protected:
@@ -100,8 +98,8 @@ public:
 
   /// Element of an initializer list that contains secondary names.
   struct Definition {
-    const E &value;                                       ///< Value for definition.
-    const std::initializer_list<std::string_view> &names; ///< Primary then secondary names.
+    const E& value;                                       ///< Value for definition.
+    const std::initializer_list<std::string_view>& names; ///< Primary then secondary names.
   };
 
   /// Construct empty instance.
@@ -122,8 +120,9 @@ public:
    *
    * @see set_default.
    */
-  explicit Lexicon(const std::initializer_list<Definition> &items, DefaultHandler handler_1 = DefaultHandler{},
-                   DefaultHandler handler_2 = DefaultHandler{});
+  explicit Lexicon(const std::initializer_list<Definition>& items
+                   , DefaultHandler handler_1 = DefaultHandler{}
+                   , DefaultHandler handler_2 = DefaultHandler{});
 
   /** Construct with names / value pairs, and optional default handlers.
    *
@@ -138,8 +137,9 @@ public:
    *
    * @see set_default.
    */
-  explicit Lexicon(const std::initializer_list<Pair> &items, DefaultHandler handler_1 = DefaultHandler{},
-                   DefaultHandler handler_2 = DefaultHandler{});
+  explicit Lexicon(const std::initializer_list<Pair>& items
+                   , DefaultHandler handler_1 = DefaultHandler{}
+                   , DefaultHandler handler_2 = DefaultHandler{});
 
   /** Construct with only default values / handlers.
    *
@@ -165,23 +165,24 @@ public:
    * @param name Name to look up.
    * @return The value for the @a name.
    */
-  E operator[](std::string_view const &name) const;
+  E operator[](std::string_view const& name) const;
 
   /// Define the @a names for a @a value.
   /// The first name is the primary name. All @a names must be convertible to @c std::string_view.
   /// <tt>lexicon.define(Value, primary, [secondary, ... ]);</tt>
-  template <typename... Args> self_type &define(E value, Args &&... names);
+  template<typename... Args> self_type& define(E value, Args&& ... names);
+
   // These are really for consistency with constructors, they're not expected to be commonly used.
   /// Define a value and names.
   /// <tt>lexicon.define(Value, { primary, [secondary, ...] });</tt>
-  self_type &define(E value, const std::initializer_list<std::string_view> &names);
+  self_type& define(E value, const std::initializer_list<std::string_view>& names);
 
   /** Define a name, value pair.
    *
    * @param pair A @c Pair of the name and value to define.
    * @return @a this.
    */
-  self_type &define(const Pair &pair);
+  self_type& define(const Pair& pair);
 
   /** Define a name with a primary and secondary values.
    *
@@ -193,7 +194,7 @@ public:
    * secondary values are not. This is to make it possible to define all values in this style
    * even if some do not have secondary values.
    */
-  self_type &define(const Definition &init);
+  self_type& define(const Definition& init);
 
   /** Set default handler.
    *
@@ -214,7 +215,7 @@ public:
    * - A @c DefaultValueHandler. This is a functor that takes a name as a @c string_view and returns
    *   an enumeration value as the value for any name that is not found.
    */
-  self_type &set_default(DefaultHandler const &handler);
+  self_type& set_default(DefaultHandler const& handler);
 
   /// Get the number of values with definitions.
   size_t count() const;
@@ -226,30 +227,39 @@ public:
   public:
     using value_type        = const Pair;
     using pointer           = value_type *;
-    using reference         = value_type &;
+    using reference         = value_type&;
     using difference_type   = ptrdiff_t;
     using iterator_category = std::bidirectional_iterator_tag;
 
-    const_iterator()                      = default;
-    const_iterator(self_type const &that) = default;
-    const_iterator(self_type &&that)      = default;
+    const_iterator() = default;
+
+    const_iterator(self_type const& that) = default;
+
+    const_iterator(self_type&& that) = default;
 
     reference operator*() const;
+
     pointer operator->() const;
 
-    self_type &operator=(self_type const &that) = default;
-    bool operator==(self_type const &that) const;
-    bool operator!=(self_type const &that) const;
+    self_type& operator=(self_type const& that) = default;
+
+    bool operator==(self_type const& that) const;
+
+    bool operator!=(self_type const& that) const;
+
+    self_type& operator++();
 
-    self_type &operator++();
     self_type operator++(int);
 
-    self_type &operator--();
+    self_type& operator--();
+
     self_type operator--(int);
 
   protected:
     const_iterator(const Item *item);
+
     void update();
+
     const Item *_item{nullptr};
     typename std::remove_const<value_type>::type _v;
 
@@ -260,6 +270,7 @@ public:
   using iterator = const_iterator;
 
   const_iterator begin() const;
+
   const_iterator end() const;
 
 protected:
@@ -273,17 +284,17 @@ protected:
     E _value;
 
     std::string_view
-    operator()(std::monostate const &) const {
+    operator()(std::monostate const&) const {
       throw std::domain_error(detail::what("Lexicon: invalid enumeration value {}", static_cast<int>(_value)).data());
     }
 
     std::string_view
-    operator()(std::string_view const &name) const {
+    operator()(std::string_view const& name) const {
       return name;
     }
 
     std::string_view
-    operator()(UnknownValueHandler const &handler) const {
+    operator()(UnknownValueHandler const& handler) const {
       return handler(_value);
     }
   };
@@ -293,17 +304,17 @@ protected:
     std::string_view _name;
 
     E
-    operator()(std::monostate const &) const {
+    operator()(std::monostate const&) const {
       throw std::domain_error(detail::what("Lexicon: Unknown name \"{}\"", _name).data());
     }
 
     E
-    operator()(E const &value) const {
+    operator()(E const& value) const {
       return value;
     }
 
     E
-    operator()(UnknownNameHandler const &handler) const {
+    operator()(UnknownNameHandler const& handler) const {
       return handler(_name);
     }
   };
@@ -327,15 +338,15 @@ protected:
       Item *_next{nullptr};
       Item *_prev{nullptr};
 
-      static Item *&next_ptr(Item *);
+      static Item *& next_ptr(Item *);
 
-      static Item *&prev_ptr(Item *);
+      static Item *& prev_ptr(Item *);
 
       static std::string_view key_of(Item *);
 
       static uint32_t hash_of(std::string_view s);
 
-      static bool equal(std::string_view const &lhs, std::string_view const &rhs);
+      static bool equal(std::string_view const& lhs, std::string_view const& rhs);
     } _name_link;
 
     /// Intrusive linkage for value lookup.
@@ -343,9 +354,9 @@ protected:
       Item *_next{nullptr};
       Item *_prev{nullptr};
 
-      static Item *&next_ptr(Item *);
+      static Item *& next_ptr(Item *);
 
-      static Item *&prev_ptr(Item *);
+      static Item *& prev_ptr(Item *);
 
       static E key_of(Item *);
 
@@ -356,7 +367,7 @@ protected:
   };
 
   /// Copy @a name in to local storage.
-  std::string_view localize(std::string_view const &name);
+  std::string_view localize(std::string_view const& name);
 
   /// Storage for names.
   MemArena _arena{1024};
@@ -374,64 +385,65 @@ protected:
 // ----
 // Item
 
-template <typename E> Lexicon<E>::Item::Item(E value, std::string_view name) : _value(value), _name(name) {}
+template<typename E>
+Lexicon<E>::Item::Item(E value, std::string_view name) : _value(value), _name(name) {}
 
-template <typename E>
+template<typename E>
 auto
 Lexicon<E>::Item::NameLinkage::next_ptr(Item *item) -> Item *& {
   return item->_name_link._next;
 }
 
-template <typename E>
+template<typename E>
 auto
 Lexicon<E>::Item::NameLinkage::prev_ptr(Item *item) -> Item *& {
   return item->_name_link._prev;
 }
 
-template <typename E>
+template<typename E>
 auto
 Lexicon<E>::Item::ValueLinkage::next_ptr(Item *item) -> Item *& {
   return item->_value_link._next;
 }
 
-template <typename E>
+template<typename E>
 auto
 Lexicon<E>::Item::ValueLinkage::prev_ptr(Item *item) -> Item *& {
   return item->_value_link._prev;
 }
 
-template <typename E>
+template<typename E>
 std::string_view
 Lexicon<E>::Item::NameLinkage::key_of(Item *item) {
   return item->_name;
 }
 
-template <typename E>
+template<typename E>
 E
 Lexicon<E>::Item::ValueLinkage::key_of(Item *item) {
   return item->_value;
 }
 
-template <typename E>
+template<typename E>
 uint32_t
 Lexicon<E>::Item::NameLinkage::hash_of(std::string_view s) {
   return Hash32FNV1a().hash_immediate(transform_view_of(&toupper, s));
 }
 
-template <typename E>
+template<typename E>
 uintmax_t
 Lexicon<E>::Item::ValueLinkage::hash_of(E value) {
   // In almost all cases, the values will be (roughly) sequential, so an identity hash works well.
   return static_cast<uintmax_t>(value);
 }
 
-template <typename E>
+template<typename E>
 bool
-Lexicon<E>::Item::NameLinkage::equal(std::string_view const &lhs, std::string_view const &rhs) {
+Lexicon<E>::Item::NameLinkage::equal(std::string_view const& lhs, std::string_view const& rhs) {
   return 0 == strcasecmp(lhs, rhs);
 }
 
-template <typename E>
+template<typename E>
 bool
 Lexicon<E>::Item::ValueLinkage::equal(E lhs, E rhs) {
   return lhs == rhs;
@@ -440,143 +452,133 @@ Lexicon<E>::Item::ValueLinkage::equal(E lhs, E rhs) {
 // -------
 // Lexicon
 
-template <typename E> Lexicon<E>::Lexicon() {}
+template<typename E> Lexicon<E>::Lexicon() {}
 
-template <typename E>
-Lexicon<E>::Lexicon(const std::initializer_list<Definition> &items, DefaultHandler handler_1, DefaultHandler handler_2) {
-  for (auto const &item : items) {
+template<typename E>
+Lexicon<E>::Lexicon(const std::initializer_list<Definition>& items, DefaultHandler handler_1
+                    , DefaultHandler handler_2) {
+  for (auto const& item : items) {
     this->define(item.value, item.names);
   }
 
-  for (auto &&h : {handler_1, handler_2}) {
+  for (auto&& h : {handler_1, handler_2}) {
     this->set_default(h);
   }
 }
 
-template <typename E>
-Lexicon<E>::Lexicon(const std::initializer_list<Pair> &items, DefaultHandler handler_1, DefaultHandler handler_2) {
-  for (auto const &item : items) {
+template<typename E>
+Lexicon<E>::Lexicon(const std::initializer_list<Pair>& items, DefaultHandler handler_1
+                    , DefaultHandler handler_2) {
+  for (auto const& item : items) {
     this->define(item);
   }
 
-  for (auto &&h : {handler_1, handler_2}) {
+  for (auto&& h : {handler_1, handler_2}) {
     this->set_default(h);
   }
 }
 
-template <typename E>
+template<typename E>
 Lexicon<E>::Lexicon(DefaultHandler handler_1, DefaultHandler handler_2) {
-  for (auto &&h : {handler_1, handler_2}) {
+  for (auto&& h : {handler_1, handler_2}) {
     this->set_default(h);
   }
 }
 
-template <typename E>
+template<typename E>
 std::string_view
-Lexicon<E>::localize(std::string_view const &name) {
+Lexicon<E>::localize(std::string_view const& name) {
   auto span = _arena.alloc(name.size());
   memcpy(span.data(), name.data(), name.size());
   return span.view();
 }
 
-template <typename E> std::string_view Lexicon<E>::operator[](E value) const {
+template<typename E> std::string_view Lexicon<E>::operator[](E value) const {
   auto spot = _by_value.find(value);
-  if (spot != _by_value.end())
-  {
+  if (spot != _by_value.end()) {
     return spot->_name;
   }
   return std::visit(NameDefaultVisitor{value}, _name_default);
 }
 
-template <typename E> E Lexicon<E>::operator[](std::string_view const &name) const {
+template<typename E> E Lexicon<E>::operator[](std::string_view const& name) const {
   auto spot = _by_name.find(name);
-  if (spot != _by_name.end())
-  {
+  if (spot != _by_name.end()) {
     return spot->_value;
   }
   return std::visit(ValueDefaultVisitor{name}, _value_default);
 }
 
-template <typename E>
+template<typename E>
 auto
-Lexicon<E>::define(E value, const std::initializer_list<std::string_view> &names) -> self_type & {
-  if (names.size() < 1)
-  {
+Lexicon<E>::define(E value, const std::initializer_list<std::string_view>& names) -> self_type& {
+  if (names.size() < 1) {
     throw std::invalid_argument("A defined value must have at least a primary name");
   }
-  for (auto name : names)
-  {
-    if (_by_name.find(name) != _by_name.end())
-    {
+  for (auto name : names) {
+    if (_by_name.find(name) != _by_name.end()) {
       throw std::invalid_argument(detail::what("Duplicate name '{}' in Lexicon", name));
     }
     auto i = new Item(value, this->localize(name));
     _by_name.insert(i);
     // Only put primary names in the value table.
-    if (_by_value.find(value) == _by_value.end())
-    {
+    if (_by_value.find(value) == _by_value.end()) {
       _by_value.insert(i);
     }
   }
   return *this;
 }
 
-template <typename E>
-template <typename... Args>
+template<typename E>
+template<typename... Args>
 auto
-Lexicon<E>::define(E value, Args &&... names) -> self_type & {
+Lexicon<E>::define(E value, Args&& ... names) -> self_type& {
   static_assert(sizeof...(Args) > 0, "A defined value must have at least a priamry name");
   return this->define(value, {std::forward<Args>(names)...});
 }
 
-template <typename E>
+template<typename E>
 auto
-Lexicon<E>::define(const Pair &pair) -> self_type & {
+Lexicon<E>::define(const Pair& pair) -> self_type& {
   return this->define(std::get<0>(pair), {std::get<1>(pair)});
 }
 
-template <typename E>
+template<typename E>
 auto
-Lexicon<E>::define(const Definition &init) -> self_type & {
+Lexicon<E>::define(const Definition& init) -> self_type& {
   return this->define(init.value, init.names);
 }
 
-template <typename E>
+template<typename E>
 auto
-Lexicon<E>::set_default(DefaultHandler const &handler) -> self_type & {
-  switch (handler.index())
-  {
-  case 0:
-    break;
-  case 1:
-    _value_default = std::get<1>(handler);
-    break;
-  case 3:
-    _value_default = std::get<3>(handler);
-    break;
-  case 2:
-    _name_default = std::get<2>(handler);
-    break;
-  case 4:
-    _name_default = std::get<4>(handler);
-    break;
+Lexicon<E>::set_default(DefaultHandler const& handler) -> self_type& {
+  switch (handler.index()) {
+    case 0:break;
+    case 1:_value_default = std::get<1>(handler);
+      break;
+    case 3:_value_default = std::get<3>(handler);
+      break;
+    case 2:_name_default = std::get<2>(handler);
+      break;
+    case 4:_name_default = std::get<4>(handler);
+      break;
   }
   return *this;
 }
 
-template <typename E>
+template<typename E>
 size_t
 Lexicon<E>::count() const {
   return _by_value.count();
 }
 
-template <typename E>
+template<typename E>
 auto
 Lexicon<E>::begin() const -> const_iterator {
   return const_iterator{static_cast<const Item *>(_by_value.begin())};
 }
 
-template <typename E>
+template<typename E>
 auto
 Lexicon<E>::end() const -> const_iterator {
   return {};
@@ -584,51 +586,49 @@ Lexicon<E>::end() const -> const_iterator {
 
 // Iterators
 
-template <typename E>
+template<typename E>
 void
 Lexicon<E>::const_iterator::update() {
   std::get<0>(_v) = _item->_value;
   std::get<1>(_v) = _item->_name;
 }
 
-template <typename E> Lexicon<E>::const_iterator::const_iterator(const Item *item) : _item(item) {
-  if (_item)
-  {
+template<typename E> Lexicon<E>::const_iterator::const_iterator(const Item *item) : _item(item) {
+  if (_item) {
     this->update();
   };
 }
 
-template <typename E> auto Lexicon<E>::const_iterator::operator*() const -> reference {
+template<typename E> auto Lexicon<E>::const_iterator::operator*() const -> reference {
   return _v;
 }
 
-template <typename E> auto Lexicon<E>::const_iterator::operator-> () const -> pointer {
+template<typename E> auto Lexicon<E>::const_iterator::operator->() const -> pointer {
   return &_v;
 }
 
-template <typename E>
+template<typename E>
 bool
-Lexicon<E>::const_iterator::operator==(self_type const &that) const {
+Lexicon<E>::const_iterator::operator==(self_type const& that) const {
   return _item == that._item;
 }
 
-template <typename E>
+template<typename E>
 bool
-Lexicon<E>::const_iterator::operator!=(self_type const &that) const {
+Lexicon<E>::const_iterator::operator!=(self_type const& that) const {
   return _item != that._item;
 }
 
-template <typename E>
+template<typename E>
 auto
-Lexicon<E>::const_iterator::operator++() -> self_type & {
-  if (nullptr != (_item = _item->_value_link._next))
-  {
+Lexicon<E>::const_iterator::operator++() -> self_type& {
+  if (nullptr != (_item = _item->_value_link._next)) {
     this->update();
   }
   return *this;
 }
 
-template <typename E>
+template<typename E>
 auto
 Lexicon<E>::const_iterator::operator++(int) -> self_type {
   self_type tmp{*this};
@@ -636,17 +636,16 @@ Lexicon<E>::const_iterator::operator++(int) -> self_type {
   return tmp;
 }
 
-template <typename E>
+template<typename E>
 auto
-Lexicon<E>::const_iterator::operator--() -> self_type & {
-  if (nullptr != (_item = _item->_value_link->_prev))
-  {
+Lexicon<E>::const_iterator::operator--() -> self_type& {
+  if (nullptr != (_item = _item->_value_link->_prev)) {
     this->update();
   }
   return *this;
 }
 
-template <typename E>
+template<typename E>
 auto
 Lexicon<E>::const_iterator::operator--(int) -> self_type {
   self_type tmp;
@@ -654,4 +653,4 @@ Lexicon<E>::const_iterator::operator--(int) -> self_type {
   return tmp;
 }
 
-} // namespace SWOC_NAMESPACE
+}} // namespace swoc
diff --git a/swoc++/include/swoc/MemArena.h b/swoc++/include/swoc/MemArena.h
index b15a347..51f76fd 100644
--- a/swoc++/include/swoc/MemArena.h
+++ b/swoc++/include/swoc/MemArena.h
@@ -17,8 +17,7 @@
 #include "swoc/Scalar.h"
 #include "swoc/IntrusiveDList.h"
 
-namespace SWOC_NAMESPACE
-{
+namespace swoc { inline namespace SWOC_VERSION_NS {
 /** A memory arena.
 
     The intended use is for allocating many small chunks of memory - few, large allocations are best
@@ -27,8 +26,7 @@ namespace SWOC_NAMESPACE
     chunks are presumed to have similar lifetimes so all of the memory in the arena can be released
     when the arena is destroyed.
  */
-class MemArena
-{
+class MemArena {
   using self_type = MemArena; ///< Self reference type.
 
 public:
@@ -62,7 +60,7 @@ public:
      *
      * @return @a this.
      */
-    Block &discard();
+    Block& discard();
 
     /** Check if the byte at address @a ptr is in this block.
      *
@@ -101,9 +99,9 @@ public:
       Block *_next{nullptr};
       Block *_prev{nullptr};
 
-      static Block *&next_ptr(Block *);
+      static Block *& next_ptr(Block *);
 
-      static Block *&prev_ptr(Block *);
+      static Block *& prev_ptr(Block *);
     } _link;
   };
 
@@ -125,16 +123,17 @@ public:
   explicit MemArena(size_t n = DEFAULT_BLOCK_SIZE);
 
   /// no copying
-  MemArena(self_type const &that) = delete;
+  MemArena(self_type const& that) = delete;
 
   /// Allow moving the arena.
-  MemArena(self_type &&that);
+  MemArena(self_type&& that);
 
   /// Destructor.
   ~MemArena();
 
-  self_type &operator=(self_type const &that) = delete;
-  self_type &operator                         =(self_type &&that);
+  self_type& operator=(self_type const& that) = delete;
+
+  self_type& operator=(self_type&& that);
 
   /** Make a self-contained instance.
    *
@@ -186,7 +185,7 @@ public:
       general it is a bad idea to make objects in the Arena that own memory that is not also in the
       Arena.
   */
-  template <typename T, typename... Args> T *make(Args &&... args);
+  template<typename T, typename... Args> T *make(Args&& ... args);
 
   /** Freeze reserved memory.
 
@@ -198,7 +197,7 @@ public:
       @param n Target number of available bytes in the next reserved internal block.
       @return @c *this
    */
-  MemArena &freeze(size_t n = 0);
+  MemArena& freeze(size_t n = 0);
 
   /** Unfreeze arena.
    *
@@ -206,7 +205,7 @@ public:
    *
    * @return @c *this
    */
-  self_type &thaw();
+  self_type& thaw();
 
   /** Release all memory.
 
@@ -220,7 +219,7 @@ public:
       @see discard
 
    */
-  MemArena &clear(size_t hint = 0);
+  MemArena& clear(size_t hint = 0);
 
   /** Discard all allocations.
    *
@@ -232,7 +231,7 @@ public:
    *
    * @see clear
    */
-  MemArena &discard(size_t hint = 0);
+  MemArena& discard(size_t hint = 0);
 
   /// @return The amount of memory allocated.
   size_t size() const;
@@ -251,7 +250,7 @@ public:
    * This forces the @c remnant to be at least @a n bytes of contiguous memory. A subsequent
    * @c alloc will use this space if the allocation size is at most the remnant size.
    */
-  self_type &require(size_t n);
+  self_type& require(size_t n);
 
   /// @returns the total number of bytes allocated within the arena.
   size_t allocated_size() const;
@@ -273,10 +272,12 @@ public:
 
   /// Iterate over active blocks.
   const_iterator begin() const;
+
   const_iterator end() const;
 
   /// Iterator over frozen blocks.
   const_iterator frozen_begin() const;
+
   const_iterator frozen_end() const;
 
 protected:
@@ -298,10 +299,11 @@ protected:
 
   static constexpr size_t ALLOC_HEADER_SIZE = 16; ///< Guess of overhead of @c malloc
   /// Initial block size to allocate if not specified via API.
-  static constexpr size_t DEFAULT_BLOCK_SIZE = Page::SCALE - Paragraph{round_up(ALLOC_HEADER_SIZE + sizeof(Block))};
+  static constexpr size_t DEFAULT_BLOCK_SIZE =
+      Page::SCALE - Paragraph{round_up(ALLOC_HEADER_SIZE + sizeof(Block))};
 
   size_t _active_allocated = 0; ///< Total allocations in the active generation.
-  size_t _active_reserved  = 0; ///< Total current reserved memory.
+  size_t _active_reserved = 0; ///< Total current reserved memory.
   /// Total allocations in the previous generation. This is only non-zero while the arena is frozen.
   size_t _frozen_allocated = 0;
   /// Total frozen reserved memory.
@@ -326,8 +328,7 @@ protected:
  * A pool of unused / free instances of @a T is kept for reuse. If none are available then a new
  * instance is allocated from the arena.
  */
-template <typename T> class FixedArena
-{
+template<typename T> class FixedArena {
   using self_type = FixedArena; ///< Self reference type.
 protected:
   /// Rebinding type for instances on the free list.
@@ -336,14 +337,14 @@ protected:
   };
 
   Item _list{nullptr}; ///< List of dead instances.
-  MemArena &_arena;    ///< Memory source.
+  MemArena& _arena;    ///< Memory source.
 
 public:
   /** Construct a pool.
    *
    * @param arena The arena for memory.
    */
-  explicit FixedArena(MemArena &arena);
+  explicit FixedArena(MemArena& arena);
 
   /** Create a new instance.
    *
@@ -351,7 +352,7 @@ public:
    * @param args Constructor arguments.
    * @return A new instance of @a T.
    */
-  template <typename... Args> T *make(Args... args);
+  template<typename... Args> T *make(Args... args);
 
   /** Destroy an instance.
    *
@@ -398,17 +399,16 @@ inline bool MemArena::Block::is_full() const {
 }
 
 inline MemSpan<void> MemArena::Block::alloc(size_t n) {
-  if (n > this->remaining())
-  {
-    throw(std::invalid_argument{"MemArena::Block::alloc size is more than remaining."});
+  if (n > this->remaining()) {
+    throw (std::invalid_argument{"MemArena::Block::alloc size is more than remaining."});
   }
   MemSpan<void> zret = this->remnant().prefix(n);
   allocated += n;
   return zret;
 }
 
-template <typename T, typename... Args> T *MemArena::make(Args &&... args) {
-  return new (this->alloc(sizeof(T)).data()) T(std::forward<Args>(args)...);
+template<typename T, typename... Args> T *MemArena::make(Args&& ... args) {
+  return new(this->alloc(sizeof(T)).data()) T(std::forward<Args>(args)...);
 }
 
 inline MemArena::MemArena(size_t n) : _reserve_hint(n) {}
@@ -417,7 +417,7 @@ inline MemSpan<void> MemArena::Block::remnant() {
   return {this->data() + allocated, this->remaining()};
 }
 
-inline MemArena::Block &MemArena::Block::discard() {
+inline MemArena::Block& MemArena::Block::discard() {
   allocated = 0;
   return *this;
 }
@@ -458,23 +458,23 @@ inline auto MemArena::frozen_end() const -> const_iterator {
   return _frozen.end();
 }
 
-template <typename T> FixedArena<T>::FixedArena(MemArena &arena) : _arena(arena) {
+template<typename T> FixedArena<T>::FixedArena(MemArena& arena) : _arena(arena) {
   static_assert(sizeof(T) >= sizeof(T *));
 }
 
-template <typename T> template <typename... Args> T *FixedArena<T>::make(Args... args) {
+template<typename T> template<typename... Args> T *FixedArena<T>::make(Args... args) {
   if (_list._next) {
-    void *t     = _list._next;
+    void *t = _list._next;
     _list._next = _list._next->_next;
-    return new (t) T(std::forward<Args>(args)...);
+    return new(t) T(std::forward<Args>(args)...);
   }
   return _arena.template make<T>(std::forward<Args>(args)...);
 }
 
-template <typename T> void FixedArena<T>::destroy(T *t) {
+template<typename T> void FixedArena<T>::destroy(T *t) {
   if (t) {
     t->~T(); // destructor.
-    auto item   = reinterpret_cast<Item *>(t);
+    auto item = reinterpret_cast<Item *>(t);
     item->_next = _list._next;
     _list._next = item;
   }
@@ -485,4 +485,4 @@ void FixedArena<T>::clear() {
   _list._next = nullptr;
 }
 
-} // namespace SWOC_NAMESPACE
+}} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/MemSpan.h b/swoc++/include/swoc/MemSpan.h
index 48f2869..cd45d6c 100644
--- a/swoc++/include/swoc/MemSpan.h
+++ b/swoc++/include/swoc/MemSpan.h
@@ -21,8 +21,7 @@
 
 #include "swoc/swoc_version.h"
 
-namespace SWOC_NAMESPACE
-{
+namespace swoc { inline namespace SWOC_VERSION_NS {
 /** A span of contiguous piece of memory.
 
     A @c MemSpan does not own the memory to which it refers, it is simply a span of part of some
@@ -916,7 +915,7 @@ MemSpan<void>::view() const {
   return {static_cast<char const *>(_ptr), _size};
 }
 
-} // namespace SWOC_NAMESPACE
+}} // namespace SWOC_NAMESPACE
 
 /// @cond NO_DOXYGEN
 // STL tuple support - this allows the @c MemSpan to be used as a tuple of a pointer
diff --git a/swoc++/include/swoc/RBTree.h b/swoc++/include/swoc/RBTree.h
index a6005dd..2150bb5 100644
--- a/swoc++/include/swoc/RBTree.h
+++ b/swoc++/include/swoc/RBTree.h
@@ -9,222 +9,216 @@
 #include "swoc/swoc_version.h"
 #include "swoc/IntrusiveDList.h"
 
-namespace SWOC_NAMESPACE
-{
-namespace detail
-{
-  /** A node in a red/black tree.
-
-      This class provides only the basic tree operations. The container must provide the search and
-      decision logic. This enables this class to be a base class for templated nodes with much less
-      code duplication.
-
-      @internal The primary point of a custom implementation is to hook on rotation events which
-      are used to update additional tree data. This provides a significant performance boost
-      for range based uses of this class.
+namespace swoc { inline namespace SWOC_VERSION_NS {
+namespace detail {
+/** A node in a red/black tree.
+
+    This class provides only the basic tree operations. The container must provide the search and
+    decision logic. This enables this class to be a base class for templated nodes with much less
+    code duplication.
+
+    @internal The primary point of a custom implementation is to hook on rotation events which
+    are used to update additional tree data. This provides a significant performance boost
+    for range based uses of this class.
+*/
+struct RBNode {
+  using self_type = RBNode; ///< self reference type
+
+  /// Node colors
+  enum class Color {
+    RED, BLACK, };
+
+  /// Directional constants
+  enum class Direction {
+    NONE, LEFT, RIGHT, };
+
+  /// Default constructor.
+  RBNode() = default;
+
+  /// Force virtual destructor.
+  virtual ~RBNode() {}
+
+  /** Get the child in direction @a dir.
+   *
+   * @param d Child direction.
+   * @return A pointer to the child node, or @c nullptr if no child in that direction.
+   */
+  self_type *child_at(Direction d) const;
+
+  /** Get the direction of a child node @a n.
+   *
+   * @param n Child node.
+   * @return Direction of the child if @a n is a child, @c Direction::NONE if not.
+   */
+  Direction direction_of(self_type *const& n) const;
+
+  /// @return The color of the node.
+  Color color() const;
+
+  self_type *left_most_descendant() const;
+
+  /** Reverse a direction
+      @return @c LEFT if @a d is @c RIGHT, @c RIGHT if @a d is @c LEFT,
+      @c NONE otherwise.
   */
-  struct RBNode {
-    using self_type = RBNode; ///< self reference type
-
-    /// Node colors
-    enum class Color {
-      RED,
-      BLACK,
-    };
-
-    /// Directional constants
-    enum class Direction {
-      NONE,
-      LEFT,
-      RIGHT,
-    };
-
-    /// Default constructor.
-    RBNode() = default;
-
-    /// Force virtual destructor.
-    virtual ~RBNode() {}
-
-    /** Get the child in direction @a dir.
-     *
-     * @param d Child direction.
-     * @return A pointer to the child node, or @c nullptr if no child in that direction.
-     */
-    self_type *child_at(Direction d) const;
-
-    /** Get the direction of a child node @a n.
-     *
-     * @param n Child node.
-     * @return Direction of the child if @a n is a child, @c Direction::NONE if not.
-     */
-    Direction direction_of(self_type *const &n) const;
-
-    /// @return The color of the node.
-    Color color() const;
-
-    self_type *left_most_descendant() const;
-
-    /** Reverse a direction
-        @return @c LEFT if @a d is @c RIGHT, @c RIGHT if @a d is @c LEFT,
-        @c NONE otherwise.
-    */
-    Direction flip(Direction d);
-
-    /** Perform internal validation checks.
-        @return 0 on failure, black height of the tree on success.
-    */
-    int validate();
-
-    /** Rotate the subtree rooted at this node in the direction @a dir.
-     *
-     * @param dir Direction of rotatoin.
-     * @return The root node after rotation.
-     *
-     * @a this node is rotated in to the position of its @a dir child and the child in the other
-     * direction becomes the new root node for the subtree. This operation is a no-op if there
-     * is no other child.
-     *
-     * If @a this node has a parent then that parent's child pointer is updated as needed.
-     */
-    self_type *rotate(Direction dir);
-
-    /** Set the @a dir child of @a this node to @a child.
-     *
-     * @param child Node to set as the child.
-     * @param dir Direction of the child location.
-     * @return @a child
-     *
-     * The internal pointers in both @a this and @a child are updated as needed. It is an error
-     * to call this if the specified child is already set.
-     */
-    self_type *set_child(self_type *child, Direction dir);
-
-    /** Remove this node from the tree.
-        The tree is rebalanced after removal.
-        @return The new root node.
-    */
-    self_type *remove();
-
-    /** Remove the @a dir child.
-     *
-     * @param dir Direction of child to remove.
-     *
-     * The pointers in @a this and the child are updated as needed. It is not an error if there
-     * is no child in the direction @a dir.
-     */
-    void clear_child(Direction dir);
-
-    /** @name Subclass hook methods */
-    //@{
-    /** Structural change notification.
-
-        This method is called if the structure of the subtree rooted at this node was changed. This
-        makes it possible to keep subtree information nodes synchronized with the state of the tree
-        efficiently.
-
-        This is intended a hook. The base method is empty so that subclasses are not required to
-        override.
-
-        @internal This is the primary reason for this class.
-    */
-    virtual void structure_fixup() {}
-
-    /** Called from @c validate to perform any additional validation checks.
-        Clients should chain this if they wish to perform additional checks.
-        @return @c true if the validation is successful, @c false otherwise.
-    */
-    virtual bool structure_validate();
-    //@}
-
-    /** Replace @a this node with @a n.
-     *
-     * @param n Replacement node.
-     *
-     * Invariant: this is a non-order modifying replacement.
-     */
-    void replace_with(self_type *n);
-
-    //! Rebalance the tree starting at this node
-    /** The tree is rebalanced so that all of the invariants are
-        true. The (potentially new) root of the tree is returned.
-
-        @return The root node of the tree after the rebalance.
-    */
-    self_type *rebalance_after_insert();
-
-    /** Rebalance the tree after a deletion.
-        Called on the lowest modified node.
-        @return The new root of the tree.
-    */
-    /** Rebalance the tree root at @a this node after a removal.
-     *
-     * @param c The color of the removed node.
-     * @param d The direction of the removed node from @a this.
-     * @return The new root node.
-     *
-     * Invariant: @a this is the parent of the removed node.
-     */
-    self_type *rebalance_after_remove(Color c, Direction dir);
-
-    /** Invoke @c structure_fixup on @a this node and its parents to the root.
-     *
-     * @return @a The root node.
-     *
-     * @note This is used by the base class to inform subclasses of structure changes, starting
-     * from a leaf node up to the root node.
-     */
-    self_type *ripple_structure_fixup();
-
-    Color _color{Color::RED};    ///< node color
-    self_type *_parent{nullptr}; ///< parent node (needed for rotations)
-    self_type *_left{nullptr};   ///< left child
-    self_type *_right{nullptr};  ///< right child
-    self_type *_next{nullptr};   ///< Next node.
-    self_type *_prev{nullptr};   ///< Previous node.
-
-    /// Support for @c IntrusiveDList
-    struct Linkage {
-      static self_type *& next_ptr(self_type *t) {
-        return swoc::ptr_ref_cast<self_type>(t->_next);
-      }
-      static self_type *& prev_ptr(self_type *t) {
-        return swoc::ptr_ref_cast<self_type>(t->_prev);
-      }
-    };
+  Direction flip(Direction d);
 
+  /** Perform internal validation checks.
+      @return 0 on failure, black height of the tree on success.
+  */
+  int validate();
+
+  /** Rotate the subtree rooted at this node in the direction @a dir.
+   *
+   * @param dir Direction of rotatoin.
+   * @return The root node after rotation.
+   *
+   * @a this node is rotated in to the position of its @a dir child and the child in the other
+   * direction becomes the new root node for the subtree. This operation is a no-op if there
+   * is no other child.
+   *
+   * If @a this node has a parent then that parent's child pointer is updated as needed.
+   */
+  self_type *rotate(Direction dir);
+
+  /** Set the @a dir child of @a this node to @a child.
+   *
+   * @param child Node to set as the child.
+   * @param dir Direction of the child location.
+   * @return @a child
+   *
+   * The internal pointers in both @a this and @a child are updated as needed. It is an error
+   * to call this if the specified child is already set.
+   */
+  self_type *set_child(self_type *child, Direction dir);
+
+  /** Remove this node from the tree.
+      The tree is rebalanced after removal.
+      @return The new root node.
+  */
+  self_type *remove();
 
+  /** Remove the @a dir child.
+   *
+   * @param dir Direction of child to remove.
+   *
+   * The pointers in @a this and the child are updated as needed. It is not an error if there
+   * is no child in the direction @a dir.
+   */
+  void clear_child(Direction dir);
+
+  /** @name Subclass hook methods */
+  //@{
+  /** Structural change notification.
+
+      This method is called if the structure of the subtree rooted at this node was changed. This
+      makes it possible to keep subtree information nodes synchronized with the state of the tree
+      efficiently.
+
+      This is intended a hook. The base method is empty so that subclasses are not required to
+      override.
+
+      @internal This is the primary reason for this class.
+  */
+  virtual void structure_fixup() {}
+
+  /** Called from @c validate to perform any additional validation checks.
+      Clients should chain this if they wish to perform additional checks.
+      @return @c true if the validation is successful, @c false otherwise.
+  */
+  virtual bool structure_validate();
+  //@}
+
+  /** Replace @a this node with @a n.
+   *
+   * @param n Replacement node.
+   *
+   * Invariant: this is a non-order modifying replacement.
+   */
+  void replace_with(self_type *n);
+
+  //! Rebalance the tree starting at this node
+  /** The tree is rebalanced so that all of the invariants are
+      true. The (potentially new) root of the tree is returned.
+
+      @return The root node of the tree after the rebalance.
+  */
+  self_type *rebalance_after_insert();
+
+  /** Rebalance the tree after a deletion.
+      Called on the lowest modified node.
+      @return The new root of the tree.
+  */
+  /** Rebalance the tree root at @a this node after a removal.
+   *
+   * @param c The color of the removed node.
+   * @param d The direction of the removed node from @a this.
+   * @return The new root node.
+   *
+   * Invariant: @a this is the parent of the removed node.
+   */
+  self_type *rebalance_after_remove(Color c, Direction dir);
+
+  /** Invoke @c structure_fixup on @a this node and its parents to the root.
+   *
+   * @return @a The root node.
+   *
+   * @note This is used by the base class to inform subclasses of structure changes, starting
+   * from a leaf node up to the root node.
+   */
+  self_type *ripple_structure_fixup();
+
+  Color _color{Color::RED};    ///< node color
+  self_type *_parent{nullptr}; ///< parent node (needed for rotations)
+  self_type *_left{nullptr};   ///< left child
+  self_type *_right{nullptr};  ///< right child
+  self_type *_next{nullptr};   ///< Next node.
+  self_type *_prev{nullptr};   ///< Previous node.
+
+  /// Support for @c IntrusiveDList
+  struct Linkage {
+    static self_type *& next_ptr(self_type *t) {
+      return swoc::ptr_ref_cast<self_type>(t->_next);
+    }
+
+    static self_type *& prev_ptr(self_type *t) {
+      return swoc::ptr_ref_cast<self_type>(t->_prev);
+    }
   };
 
-  // --- Implementation ---
 
-  inline auto
-  RBNode::direction_of(self_type *const &n) const -> Direction {
-    return (n == _left) ? Direction::LEFT : (n == _right) ? Direction::RIGHT : Direction::NONE;
-  }
+};
 
-  inline RBNode::Color
-  RBNode::color() const {
-    return _color;
-  }
+// --- Implementation ---
 
-  inline RBNode::Direction
-  RBNode::flip(RBNode::Direction d) {
-    return Direction::LEFT == d ? Direction::RIGHT : Direction::RIGHT == d ? Direction::LEFT : Direction::NONE;
-  }
+inline auto
+RBNode::direction_of(self_type *const& n) const -> Direction {
+  return (n == _left) ? Direction::LEFT : (n == _right) ? Direction::RIGHT : Direction::NONE;
+}
 
-  inline void
-  RBNode::clear_child(RBNode::Direction dir) {
-    if (Direction::LEFT == dir)
-      _left = nullptr;
-    else if (Direction::RIGHT == dir)
-      _right = nullptr;
-  }
+inline RBNode::Color
+RBNode::color() const {
+  return _color;
+}
 
-  inline bool
-  RBNode::structure_validate() {
-    return true;
-  }
+inline RBNode::Direction
+RBNode::flip(RBNode::Direction d) {
+  return Direction::LEFT == d ? Direction::RIGHT : Direction::RIGHT == d ? Direction::LEFT
+                                                                         : Direction::NONE;
+}
 
-} // namespace detail
+inline void
+RBNode::clear_child(RBNode::Direction dir) {
+  if (Direction::LEFT == dir)
+    _left = nullptr;
+  else if (Direction::RIGHT == dir)
+    _right = nullptr;
+}
+
+inline bool
+RBNode::structure_validate() {
+  return true;
+}
 
-} // namespace SWOC_NAMESPACE
+} // namespace detail
+}} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/Scalar.h b/swoc++/include/swoc/Scalar.h
index b58a65d..5e6cc88 100644
--- a/swoc++/include/swoc/Scalar.h
+++ b/swoc++/include/swoc/Scalar.h
@@ -24,125 +24,120 @@ namespace tag
 struct generic;
 } // namespace tag
 
-namespace SWOC_NAMESPACE
-{
-template <intmax_t N, typename C, typename T> class Scalar;
+namespace swoc { inline namespace SWOC_VERSION_NS {
 
-namespace detail
-{
-  /// @cond INTERNAL_DETAIL
-
-  // @internal - although these conversion methods look bulky, in practice they compile down to
-  // very small amounts of code due to the conditions being compile time constant - the non-taken
-  // clauses are dead code and eliminated by the compiler.
-
-  // The general case where neither N nor S are a multiple of the other seems a bit long but this
-  // minimizes the risk of integer overflow.  I need to validate that under -O2 the compiler will
-  // only do 1 division to get both the quotient and remainder for (n/N) and (n%N). In cases where
-  // N,S are powers of 2 I have verified recent GNU compilers will optimize to bit operations.
-
-  // Convert a count @a c that is scale @a S to scale @c N
-  template <intmax_t N, intmax_t S, typename C>
-  C
-  scale_conversion_round_up(C c) {
-    typedef std::ratio<N, S> R;
-    if (N == S)
-    {
-      return c;
-    } else if (R::den == 1)
-    {
-      return c / R::num + (0 != c % R::num); // N is a multiple of S.
-    } else if (R::num == 1)
-    {
-      return c * R::den; // S is a multiple of N.
-    } else
-    { return (c / R::num) * R::den + ((c % R::num) * R::den) / R::num + (0 != (c % R::num)); }
-  }
+template<intmax_t N, typename C, typename T> class Scalar;
 
-  // Convert a count @a c that is scale @a S to scale @c N
-  template <intmax_t N, intmax_t S, typename C>
-  C
-  scale_conversion_round_down(C c) {
-    typedef std::ratio<N, S> R;
-    if (N == S)
-    {
-      return c;
-    } else if (R::den == 1)
-    {
-      return c / R::num; // N = k S
-    } else if (R::num == 1)
-    {
-      return c * R::den; // S = k N
-    } else
-    { return (c / R::num) * R::den + ((c % R::num) * R::den) / R::num; }
-  }
+namespace detail {
+/// @cond INTERNAL_DETAIL
 
-  /* Helper classes for @c Scalar
+// @internal - although these conversion methods look bulky, in practice they compile down to
+// very small amounts of code due to the conditions being compile time constant - the non-taken
+// clauses are dead code and eliminated by the compiler.
 
-     These wrap values to capture extra information for @c Scalar methods. This includes whether to
-     round up or down when converting and, when the wrapped data is also a @c Scalar, the scale.
+// The general case where neither N nor S are a multiple of the other seems a bit long but this
+// minimizes the risk of integer overflow.  I need to validate that under -O2 the compiler will
+// only do 1 division to get both the quotient and remainder for (n/N) and (n%N). In cases where
+// N,S are powers of 2 I have verified recent GNU compilers will optimize to bit operations.
 
-     These are not intended for direct use but by the @c round_up and @c round_down free functions
-     which capture the information about the argument and construct an instance of one of these
-     classes to pass it on to a @c Scalar method.
+// Convert a count @a c that is scale @a S to scale @c N
+template<intmax_t N, intmax_t S, typename C>
+C
+scale_conversion_round_up(C c) {
+  typedef std::ratio<N, S> R;
+  if (N == S) {
+    return c;
+  } else if (R::den == 1) {
+    return c / R::num + (0 != c % R::num); // N is a multiple of S.
+  } else if (R::num == 1) {
+    return c * R::den; // S is a multiple of N.
+  } else { return (c / R::num) * R::den + ((c % R::num) * R::den) / R::num + (0 != (c % R::num)); }
+}
 
-     Scale conversions between @c Scalar instances are handled in these classes via the templated
-     methods @c scale_conversion_round_up and @c scale_conversion_round_down.
+// Convert a count @a c that is scale @a S to scale @c N
+template<intmax_t N, intmax_t S, typename C>
+C
+scale_conversion_round_down(C c) {
+  typedef std::ratio<N, S> R;
+  if (N == S) {
+    return c;
+  } else if (R::den == 1) {
+    return c / R::num; // N = k S
+  } else if (R::num == 1) {
+    return c * R::den; // S = k N
+  } else { return (c / R::num) * R::den + ((c % R::num) * R::den) / R::num; }
+}
 
-     Conversions between scales and types for the scalar helpers is done inside the helper classes
-     and a user type conversion operator exists so the helper can be converted by the compiler to
-     the correct type. For the units base conversion this is done in @c Scalar because the
-     generality of the needed conversion is too broad to be easily used. It can be done but there is
-     some ugliness due to the fact that in some cases two user conversions are needed, which is
-     difficult to deal with. I have tried it both ways and overall this seems a cleaner
-     implementation.
+/* Helper classes for @c Scalar
 
-     Much of this is driven by the fact that the assignment operator, in some cases, can not be
-     templated and therefore to have a nice interface for assignment this split is needed.
+   These wrap values to capture extra information for @c Scalar methods. This includes whether to
+   round up or down when converting and, when the wrapped data is also a @c Scalar, the scale.
 
-     Note - the key point is the actual conversion is not done when the wrapper instance is created
-     but when the wrapper instance is assigned. That is what enables the conversion to be done in
-     the context of the destination, which is not otherwise possible.
-   */
+   These are not intended for direct use but by the @c round_up and @c round_down free functions
+   which capture the information about the argument and construct an instance of one of these
+   classes to pass it on to a @c Scalar method.
+
+   Scale conversions between @c Scalar instances are handled in these classes via the templated
+   methods @c scale_conversion_round_up and @c scale_conversion_round_down.
+
+   Conversions between scales and types for the scalar helpers is done inside the helper classes
+   and a user type conversion operator exists so the helper can be converted by the compiler to
+   the correct type. For the units base conversion this is done in @c Scalar because the
+   generality of the needed conversion is too broad to be easily used. It can be done but there is
+   some ugliness due to the fact that in some cases two user conversions are needed, which is
+   difficult to deal with. I have tried it both ways and overall this seems a cleaner
+   implementation.
+
+   Much of this is driven by the fact that the assignment operator, in some cases, can not be
+   templated and therefore to have a nice interface for assignment this split is needed.
+
+   Note - the key point is the actual conversion is not done when the wrapper instance is created
+   but when the wrapper instance is assigned. That is what enables the conversion to be done in
+   the context of the destination, which is not otherwise possible.
+ */
+
+// Unit value, to be rounded up.
+template<typename C> struct scalar_unit_round_up_t {
+  C _n;
+
+  //    template <typename I> constexpr operator scalar_unit_round_up_t<I>() { return {static_cast<I>(_count)}; }
+  template<intmax_t N, typename I>
+  constexpr I
+  scale() const {
+    return static_cast<I>(_n / N + (0 != (_n % N)));
+  }
+};
+
+// Unit value, to be rounded down.
+template<typename C> struct scalar_unit_round_down_t {
+  C _n;
+
+  //    template <typename I> operator scalar_unit_round_down_t<I>() { return {static_cast<I>(_count)}; }
+  template<intmax_t N, typename I>
+  constexpr I
+  scale() const {
+    return static_cast<I>(_n / N);
+  }
+};
+
+// Scalar value, to be rounded up.
+template<intmax_t N, typename C, typename T> struct scalar_round_up_t {
+  C _n;
+
+  template<intmax_t S, typename I> constexpr operator Scalar<S, I, T>() const {
+    return Scalar<S, I, T>(scale_conversion_round_up<S, N>(_n));
+  }
+};
+
+// Scalar value, to be rounded down.
+template<intmax_t N, typename C, typename T> struct scalar_round_down_t {
+  C _n;
 
-  // Unit value, to be rounded up.
-  template <typename C> struct scalar_unit_round_up_t {
-    C _n;
-    //    template <typename I> constexpr operator scalar_unit_round_up_t<I>() { return {static_cast<I>(_count)}; }
-    template <intmax_t N, typename I>
-    constexpr I
-    scale() const {
-      return static_cast<I>(_n / N + (0 != (_n % N)));
-    }
-  };
-
-  // Unit value, to be rounded down.
-  template <typename C> struct scalar_unit_round_down_t {
-    C _n;
-    //    template <typename I> operator scalar_unit_round_down_t<I>() { return {static_cast<I>(_count)}; }
-    template <intmax_t N, typename I>
-    constexpr I
-    scale() const {
-      return static_cast<I>(_n / N);
-    }
-  };
-
-  // Scalar value, to be rounded up.
-  template <intmax_t N, typename C, typename T> struct scalar_round_up_t {
-    C _n;
-    template <intmax_t S, typename I> constexpr operator Scalar<S, I, T>() const {
-      return Scalar<S, I, T>(scale_conversion_round_up<S, N>(_n));
-    }
-  };
-
-  // Scalar value, to be rounded down.
-  template <intmax_t N, typename C, typename T> struct scalar_round_down_t {
-    C _n;
-    template <intmax_t S, typename I> constexpr operator Scalar<S, I, T>() const {
-      return Scalar<S, I, T>(scale_conversion_round_down<S, N>(_n));
-    }
-  };
-  /// @endcond
+  template<intmax_t S, typename I> constexpr operator Scalar<S, I, T>() const {
+    return Scalar<S, I, T>(scale_conversion_round_down<S, N>(_n));
+  }
+};
+/// @endcond
 } // namespace detail
 
 /** A class to hold scaled values.
@@ -170,7 +165,7 @@ namespace detail
     @see round_up
     @see round_down
  */
-template <intmax_t N, typename C = int, typename T = tag::generic> class Scalar {
+template<intmax_t N, typename C = int, typename T = tag::generic> class Scalar {
   typedef Scalar self_type; ///< Self reference type.
 
 public:
@@ -188,35 +183,35 @@ public:
   explicit constexpr Scalar(Counter n);
 
   /// Copy constructor.
-  constexpr Scalar(self_type const &that); /// Copy constructor.
+  constexpr Scalar(self_type const& that); /// Copy constructor.
 
   /// Copy constructor for same scale.
-  template <typename I> constexpr Scalar(Scalar<N, I, T> const &that);
+  template<typename I> constexpr Scalar(Scalar<N, I, T> const& that);
 
   /// Direct conversion constructor.
   /// @note Requires that @c S be an integer multiple of @c SCALE.
-  template <intmax_t S, typename I> constexpr Scalar(Scalar<S, I, T> const &that);
+  template<intmax_t S, typename I> constexpr Scalar(Scalar<S, I, T> const& that);
 
   /// Conversion constructor.
-  constexpr Scalar(detail::scalar_round_up_t<N, C, T> const &that);
+  constexpr Scalar(detail::scalar_round_up_t<N, C, T> const& that);
 
   /// Conversion constructor.
-  constexpr Scalar(detail::scalar_round_down_t<N, C, T> const &that);
+  constexpr Scalar(detail::scalar_round_down_t<N, C, T> const& that);
 
   /// Conversion constructor.
-  template <typename I> constexpr Scalar(detail::scalar_unit_round_up_t<I> v);
+  template<typename I> constexpr Scalar(detail::scalar_unit_round_up_t<I> v);
 
   /// Conversion constructor.
-  template <typename I> constexpr Scalar(detail::scalar_unit_round_down_t<I> v);
+  template<typename I> constexpr Scalar(detail::scalar_unit_round_down_t<I> v);
 
   /// Assignment operator.
   /// The value @a that is scaled appropriately.
   /// @note Requires the scale of @a that be an integer multiple of the scale of @a this. If this isn't the case then
   /// the @c round_up or @c round_down must be used to indicate the rounding direction.
-  template <intmax_t S, typename I> self_type &operator=(Scalar<S, I, T> const &that);
+  template<intmax_t S, typename I> self_type& operator=(Scalar<S, I, T> const& that);
 
   /// Assignment from same scale.
-  self_type &operator=(self_type const &that);
+  self_type& operator=(self_type const& that);
 
   /** Internal method to assign a unit value to be rounded up to the internal @c SCALE.
    *
@@ -224,7 +219,7 @@ public:
    * @param n The value to be scaled.
    * @return @a this
    */
-  template <typename I> self_type &operator=(detail::scalar_unit_round_up_t<I> n);
+  template<typename I> self_type& operator=(detail::scalar_unit_round_up_t<I> n);
 
   /** Internal method to assign a unit value to be rounded down to the internal @c SCALE.
    *
@@ -232,7 +227,7 @@ public:
    * @param n The value to be scaled.
    * @return @a this
    */
-  template <typename I> self_type &operator=(detail::scalar_unit_round_down_t<I> n);
+  template<typename I> self_type& operator=(detail::scalar_unit_round_down_t<I> n);
 
   /** Internal method to assign a differently scaled SCALR to be rounded up.
    *
@@ -242,7 +237,7 @@ public:
    * The template parameters of @a v carry the static information needed to correctly scale
    * it to the local scale.
    */
-  self_type &operator=(detail::scalar_round_up_t<N, C, T> v);
+  self_type& operator=(detail::scalar_round_up_t<N, C, T> v);
 
   /** Internal method to assign a differently scaled SCALR to be rounded down.
    *
@@ -252,7 +247,7 @@ public:
    * The template parameters of @a v carry the static information needed to correctly scale
    * it to the local scale.
    */
-  self_type &operator=(detail::scalar_round_down_t<N, C, T> v);
+  self_type& operator=(detail::scalar_round_down_t<N, C, T> v);
 
   /** Set the scaled count to @a n.
    *
@@ -263,24 +258,29 @@ public:
    * for parsing, when the input is also in scaled units (e.g., the number of megabytes to use for
    * a file).
    */
-  self_type &assign(Counter n);
+  self_type& assign(Counter n);
 
   /// The value @a that is scaled appropriately.
   /// @note Requires the scale of @a that be an integer multiple of the scale of @a this. If this
   /// isn't the case then the @c round_up or @c round_down must be used to indicate the rounding
   /// direction.
-  template <intmax_t S, typename I> self_type &assign(Scalar<S, I, T> const &that);
+  template<intmax_t S, typename I> self_type& assign(Scalar<S, I, T> const& that);
 
   // Conversion assignments.
-  template <typename I> self_type &assign(detail::scalar_unit_round_up_t<I> n);
-  template <typename I> self_type &assign(detail::scalar_unit_round_down_t<I> n);
-  self_type &assign(detail::scalar_round_up_t<N, C, T> v);
-  self_type &assign(detail::scalar_round_down_t<N, C, T> v);
+  template<typename I> self_type& assign(detail::scalar_unit_round_up_t<I> n);
+
+  template<typename I> self_type& assign(detail::scalar_unit_round_down_t<I> n);
+
+  self_type& assign(detail::scalar_round_up_t<N, C, T> v);
+
+  self_type& assign(detail::scalar_round_down_t<N, C, T> v);
 
   /// The number of scale units.
   constexpr Counter count() const;
+
   /// The scaled value.
   constexpr intmax_t value() const;
+
   /// User conversion to scaled value.
   constexpr operator intmax_t() const;
 
@@ -288,42 +288,57 @@ public:
   /// The value is scaled from @a that to @a this.
   /// @note Requires the scale of @a that be an integer multiple of the scale of @a this. If this isn't the case then
   /// the @c scale_up or @c scale_down casts must be used to indicate the rounding direction.
-  self_type &operator+=(self_type const &that);
-  template <intmax_t S, typename I> self_type &operator+=(Scalar<S, I, T> const &that);
-  template <typename I> self_type &operator+=(detail::scalar_unit_round_up_t<I> n);
-  template <typename I> self_type &operator+=(detail::scalar_unit_round_down_t<I> n);
-  self_type &operator+=(detail::scalar_round_up_t<N, C, T> v);
-  self_type &operator+=(detail::scalar_round_down_t<N, C, T> v);
+  self_type& operator+=(self_type const& that);
+
+  template<intmax_t S, typename I> self_type& operator+=(Scalar<S, I, T> const& that);
+
+  template<typename I> self_type& operator+=(detail::scalar_unit_round_up_t<I> n);
+
+  template<typename I> self_type& operator+=(detail::scalar_unit_round_down_t<I> n);
+
+  self_type& operator+=(detail::scalar_round_up_t<N, C, T> v);
+
+  self_type& operator+=(detail::scalar_round_down_t<N, C, T> v);
 
   /// Increment - increase count by 1.
-  self_type &operator++();
+  self_type& operator++();
+
   /// Increment - increase count by 1.
   self_type operator++(int);
+
   /// Decrement - decrease count by 1.
-  self_type &operator--();
+  self_type& operator--();
+
   /// Decrement - decrease count by 1.
   self_type operator--(int);
+
   /// Increment by @a n.
-  self_type &inc(Counter n);
+  self_type& inc(Counter n);
+
   /// Decrement by @a n.
-  self_type &dec(Counter n);
+  self_type& dec(Counter n);
 
   /// Subtraction operator.
   /// The value is scaled from @a that to @a this.
   /// @note Requires the scale of @a that be an integer multiple of the scale of @a this. If this isn't the case then
   /// the @c scale_up or @c scale_down casts must be used to indicate the rounding direction.
-  self_type &operator-=(self_type const &that);
-  template <intmax_t S, typename I> self_type &operator-=(Scalar<S, I, T> const &that);
-  template <typename I> self_type &operator-=(detail::scalar_unit_round_up_t<I> n);
-  template <typename I> self_type &operator-=(detail::scalar_unit_round_down_t<I> n);
-  self_type &operator-=(detail::scalar_round_up_t<N, C, T> v);
-  self_type &operator-=(detail::scalar_round_down_t<N, C, T> v);
+  self_type& operator-=(self_type const& that);
+
+  template<intmax_t S, typename I> self_type& operator-=(Scalar<S, I, T> const& that);
+
+  template<typename I> self_type& operator-=(detail::scalar_unit_round_up_t<I> n);
+
+  template<typename I> self_type& operator-=(detail::scalar_unit_round_down_t<I> n);
+
+  self_type& operator-=(detail::scalar_round_up_t<N, C, T> v);
+
+  self_type& operator-=(detail::scalar_round_down_t<N, C, T> v);
 
   /// Multiplication - multiple the count by @a n.
-  self_type &operator*=(C n);
+  self_type& operator*=(C n);
 
   /// Division - divide (rounding down) the count by @a n.
-  self_type &operator/=(C n);
+  self_type& operator/=(C n);
 
   /// Utility overload of the function operator to create instances at the same scale.
   self_type operator()(Counter n) const;
@@ -341,131 +356,154 @@ protected:
   Counter _n; ///< Number of scale units.
 };
 
-template <intmax_t N, typename C, typename T> constexpr Scalar<N, C, T>::Scalar() : _n() {}
-template <intmax_t N, typename C, typename T> constexpr Scalar<N, C, T>::Scalar(Counter n) : _n(n) {}
-template <intmax_t N, typename C, typename T> constexpr Scalar<N, C, T>::Scalar(self_type const &that) : _n(that._n) {}
-template <intmax_t N, typename C, typename T>
-template <typename I>
-constexpr Scalar<N, C, T>::Scalar(Scalar<N, I, T> const &that) : _n(static_cast<C>(that.count())) {}
-template <intmax_t N, typename C, typename T>
-template <intmax_t S, typename I>
-constexpr Scalar<N, C, T>::Scalar(Scalar<S, I, T> const &that) : _n(std::ratio<S, N>::num * that.count()) {
-  static_assert(std::ratio<S, N>::den == 1,
-                "Construction not permitted - target scale is not an integral multiple of source scale.");
+template<intmax_t N, typename C, typename T> constexpr Scalar<N, C, T>::Scalar() : _n() {}
+
+template<intmax_t N, typename C, typename T> constexpr Scalar<N, C, T>::Scalar(Counter n) : _n(n) {}
+
+template<intmax_t N, typename C, typename T>
+constexpr Scalar<N, C, T>::Scalar(self_type const& that) : _n(that._n) {}
+
+template<intmax_t N, typename C, typename T>
+template<typename I>
+constexpr Scalar<N, C, T>::Scalar(Scalar<N, I, T> const& that) : _n(static_cast<C>(that.count())) {}
+
+template<intmax_t N, typename C, typename T>
+template<intmax_t S, typename I>
+constexpr
+Scalar<N, C, T>::Scalar(Scalar<S, I, T> const& that) : _n(std::ratio<S, N>::num * that.count()) {
+  static_assert(std::ratio<S, N>::den ==
+                1, "Construction not permitted - target scale is not an integral multiple of source scale.");
 }
-template <intmax_t N, typename C, typename T>
-constexpr Scalar<N, C, T>::Scalar(detail::scalar_round_up_t<N, C, T> const &v) : _n(v._n) {}
-template <intmax_t N, typename C, typename T>
-constexpr Scalar<N, C, T>::Scalar(detail::scalar_round_down_t<N, C, T> const &v) : _n(v._n) {}
-template <intmax_t N, typename C, typename T>
-template <typename I>
-constexpr Scalar<N, C, T>::Scalar(detail::scalar_unit_round_up_t<I> v) : _n(v.template scale<N, C>()) {}
-template <intmax_t N, typename C, typename T>
-template <typename I>
-constexpr Scalar<N, C, T>::Scalar(detail::scalar_unit_round_down_t<I> v) : _n(v.template scale<N, C>()) {}
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
+constexpr Scalar<N, C, T>::Scalar(detail::scalar_round_up_t<N, C, T> const& v) : _n(v._n) {}
+
+template<intmax_t N, typename C, typename T>
+constexpr Scalar<N, C, T>::Scalar(detail::scalar_round_down_t<N, C, T> const& v) : _n(v._n) {}
+
+template<intmax_t N, typename C, typename T>
+template<typename I>
+constexpr
+Scalar<N, C, T>::Scalar(detail::scalar_unit_round_up_t<I> v) : _n(v.template scale<N, C>()) {}
+
+template<intmax_t N, typename C, typename T>
+template<typename I>
+constexpr
+Scalar<N, C, T>::Scalar(detail::scalar_unit_round_down_t<I> v) : _n(v.template scale<N, C>()) {}
+
+template<intmax_t N, typename C, typename T>
 constexpr auto
 Scalar<N, C, T>::count() const -> Counter {
   return _n;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 constexpr intmax_t
 Scalar<N, C, T>::value() const {
   return _n * SCALE;
 }
 
-template <intmax_t N, typename C, typename T> constexpr Scalar<N, C, T>::operator intmax_t() const {
+template<intmax_t N, typename C, typename T> constexpr Scalar<N, C, T>::operator intmax_t() const {
   return _n * SCALE;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 inline auto
-Scalar<N, C, T>::assign(Counter n) -> self_type & {
+Scalar<N, C, T>::assign(Counter n) -> self_type& {
   _n = n;
   return *this;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 inline auto
-Scalar<N, C, T>::operator=(self_type const &that) -> self_type & {
+Scalar<N, C, T>::operator=(self_type const& that) -> self_type& {
   _n = that._n;
   return *this;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 inline auto
-Scalar<N, C, T>::operator=(detail::scalar_round_up_t<N, C, T> v) -> self_type & {
+Scalar<N, C, T>::operator=(detail::scalar_round_up_t<N, C, T> v) -> self_type& {
   _n = v._n;
   return *this;
 }
-template <intmax_t N, typename C, typename T>
+
+template<intmax_t N, typename C, typename T>
 inline auto
-Scalar<N, C, T>::assign(detail::scalar_round_up_t<N, C, T> v) -> self_type & {
+Scalar<N, C, T>::assign(detail::scalar_round_up_t<N, C, T> v) -> self_type& {
   _n = v._n;
   return *this;
 }
-template <intmax_t N, typename C, typename T>
+
+template<intmax_t N, typename C, typename T>
 inline auto
-Scalar<N, C, T>::operator=(detail::scalar_round_down_t<N, C, T> v) -> self_type & {
+Scalar<N, C, T>::operator=(detail::scalar_round_down_t<N, C, T> v) -> self_type& {
   _n = v._n;
   return *this;
 }
-template <intmax_t N, typename C, typename T>
+
+template<intmax_t N, typename C, typename T>
 inline auto
-Scalar<N, C, T>::assign(detail::scalar_round_down_t<N, C, T> v) -> self_type & {
+Scalar<N, C, T>::assign(detail::scalar_round_down_t<N, C, T> v) -> self_type& {
   _n = v._n;
   return *this;
 }
-template <intmax_t N, typename C, typename T>
-template <typename I>
+
+template<intmax_t N, typename C, typename T>
+template<typename I>
 inline auto
-Scalar<N, C, T>::operator=(detail::scalar_unit_round_up_t<I> v) -> self_type & {
+Scalar<N, C, T>::operator=(detail::scalar_unit_round_up_t<I> v) -> self_type& {
   _n = v.template scale<N, C>();
   return *this;
 }
-template <intmax_t N, typename C, typename T>
-template <typename I>
+
+template<intmax_t N, typename C, typename T>
+template<typename I>
 inline auto
-Scalar<N, C, T>::assign(detail::scalar_unit_round_up_t<I> v) -> self_type & {
+Scalar<N, C, T>::assign(detail::scalar_unit_round_up_t<I> v) -> self_type& {
   _n = v.template scale<N, C>();
   return *this;
 }
-template <intmax_t N, typename C, typename T>
-template <typename I>
+
+template<intmax_t N, typename C, typename T>
+template<typename I>
 inline auto
-Scalar<N, C, T>::operator=(detail::scalar_unit_round_down_t<I> v) -> self_type & {
+Scalar<N, C, T>::operator=(detail::scalar_unit_round_down_t<I> v) -> self_type& {
   _n = v.template scale<N, C>();
   return *this;
 }
-template <intmax_t N, typename C, typename T>
-template <typename I>
+
+template<intmax_t N, typename C, typename T>
+template<typename I>
 inline auto
-Scalar<N, C, T>::assign(detail::scalar_unit_round_down_t<I> v) -> self_type & {
+Scalar<N, C, T>::assign(detail::scalar_unit_round_down_t<I> v) -> self_type& {
   _n = v.template scale<N, C>();
   return *this;
 }
-template <intmax_t N, typename C, typename T>
-template <intmax_t S, typename I>
+
+template<intmax_t N, typename C, typename T>
+template<intmax_t S, typename I>
 auto
-Scalar<N, C, T>::operator=(Scalar<S, I, T> const &that) -> self_type & {
+Scalar<N, C, T>::operator=(Scalar<S, I, T> const& that) -> self_type& {
   typedef std::ratio<S, N> R;
-  static_assert(R::den == 1, "Assignment not permitted - target scale is not an integral multiple of source scale.");
+  static_assert(R::den ==
+                1, "Assignment not permitted - target scale is not an integral multiple of source scale.");
   _n = that.count() * R::num;
   return *this;
 }
-template <intmax_t N, typename C, typename T>
-template <intmax_t S, typename I>
+
+template<intmax_t N, typename C, typename T>
+template<intmax_t S, typename I>
 auto
-Scalar<N, C, T>::assign(Scalar<S, I, T> const &that) -> self_type & {
+Scalar<N, C, T>::assign(Scalar<S, I, T> const& that) -> self_type& {
   typedef std::ratio<S, N> R;
-  static_assert(R::den == 1, "Assignment not permitted - target scale is not an integral multiple of source scale.");
+  static_assert(R::den ==
+                1, "Assignment not permitted - target scale is not an integral multiple of source scale.");
   _n = that.count() * R::num;
   return *this;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 constexpr inline intmax_t
 Scalar<N, C, T>::scale() {
   return SCALE;
@@ -479,7 +517,7 @@ Scalar<N, C, T>::scale() {
  * @param n The value.
  * @return An unspecified type suitable to be assigned to a @c Scalar.
  */
-template <typename C>
+template<typename C>
 constexpr detail::scalar_unit_round_up_t<C>
 round_up(C n) {
   return {n};
@@ -493,7 +531,7 @@ round_up(C n) {
  * @param v The @c Scalar value.
  * @return
  */
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 constexpr detail::scalar_round_up_t<N, C, T>
 round_up(Scalar<N, C, T> v) {
   return {v.count()};
@@ -505,7 +543,7 @@ round_up(Scalar<N, C, T> v) {
  * @param n The value.
  * @return An unspecified type suitable to be assigned to a @c Scalar.
  */
-template <typename C>
+template<typename C>
 constexpr detail::scalar_unit_round_down_t<C>
 round_down(C n) {
   return {n};
@@ -519,7 +557,7 @@ round_down(C n) {
  * @param v The @c Scalar value.
  * @return
  */
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 constexpr detail::scalar_round_down_t<N, C, T>
 round_down(Scalar<N, C, T> v) {
   return {v.count()};
@@ -528,253 +566,267 @@ round_down(Scalar<N, C, T> v) {
 // --- Compare operators
 // These optimize nicely because if R::num or R::den is 1 the compiler will drop it.
 
-template <intmax_t N, typename C1, intmax_t S, typename I, typename T>
+template<intmax_t N, typename C1, intmax_t S, typename I, typename T>
 bool
-operator<(Scalar<N, C1, T> const &lhs, Scalar<S, I, T> const &rhs) {
+operator<(Scalar<N, C1, T> const& lhs, Scalar<S, I, T> const& rhs) {
   typedef std::ratio<N, S> R;
   return lhs.count() * R::num < rhs.count() * R::den;
 }
 
-template <intmax_t N, typename C1, intmax_t S, typename I, typename T>
+template<intmax_t N, typename C1, intmax_t S, typename I, typename T>
 bool
-operator==(Scalar<N, C1, T> const &lhs, Scalar<S, I, T> const &rhs) {
+operator==(Scalar<N, C1, T> const& lhs, Scalar<S, I, T> const& rhs) {
   typedef std::ratio<N, S> R;
   return lhs.count() * R::num == rhs.count() * R::den;
 }
 
-template <intmax_t N, typename C1, intmax_t S, typename I, typename T>
+template<intmax_t N, typename C1, intmax_t S, typename I, typename T>
 bool
-operator<=(Scalar<N, C1, T> const &lhs, Scalar<S, I, T> const &rhs) {
+operator<=(Scalar<N, C1, T> const& lhs, Scalar<S, I, T> const& rhs) {
   typedef std::ratio<N, S> R;
   return lhs.count() * R::num <= rhs.count() * R::den;
 }
 
 // Derived compares.
-template <intmax_t N, typename C, intmax_t S, typename I, typename T>
+template<intmax_t N, typename C, intmax_t S, typename I, typename T>
 bool
-operator>(Scalar<N, C, T> const &lhs, Scalar<S, I, T> const &rhs) {
+operator>(Scalar<N, C, T> const& lhs, Scalar<S, I, T> const& rhs) {
   return rhs < lhs;
 }
 
-template <intmax_t N, typename C, intmax_t S, typename I, typename T>
+template<intmax_t N, typename C, intmax_t S, typename I, typename T>
 bool
-operator>=(Scalar<N, C, T> const &lhs, Scalar<S, I, T> const &rhs) {
+operator>=(Scalar<N, C, T> const& lhs, Scalar<S, I, T> const& rhs) {
   return rhs <= lhs;
 }
 
 // Arithmetic operators
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 auto
-Scalar<N, C, T>::operator+=(self_type const &that) -> self_type & {
+Scalar<N, C, T>::operator+=(self_type const& that) -> self_type& {
   _n += that._n;
   return *this;
 }
 
-template <intmax_t N, typename C, typename T>
-template <intmax_t S, typename I>
+template<intmax_t N, typename C, typename T>
+template<intmax_t S, typename I>
 auto
-Scalar<N, C, T>::operator+=(Scalar<S, I, T> const &that) -> self_type & {
+Scalar<N, C, T>::operator+=(Scalar<S, I, T> const& that) -> self_type& {
   typedef std::ratio<S, N> R;
-  static_assert(R::den == 1, "Addition not permitted - target scale is not an integral multiple of source scale.");
+  static_assert(R::den ==
+                1, "Addition not permitted - target scale is not an integral multiple of source scale.");
   _n += that.count() * R::num;
   return *this;
 }
 
-template <intmax_t N, typename C, typename T>
-template <typename I>
+template<intmax_t N, typename C, typename T>
+template<typename I>
 auto
-Scalar<N, C, T>::operator+=(detail::scalar_unit_round_up_t<I> v) -> self_type & {
+Scalar<N, C, T>::operator+=(detail::scalar_unit_round_up_t<I> v) -> self_type& {
   _n += v.template scale<N, C>();
   return *this;
 }
 
-template <intmax_t N, typename C, typename T>
-template <typename I>
+template<intmax_t N, typename C, typename T>
+template<typename I>
 auto
-Scalar<N, C, T>::operator+=(detail::scalar_unit_round_down_t<I> v) -> self_type & {
+Scalar<N, C, T>::operator+=(detail::scalar_unit_round_down_t<I> v) -> self_type& {
   _n += v.template scale<N, C>();
   return *this;
 }
-template <intmax_t N, typename C, typename T>
+
+template<intmax_t N, typename C, typename T>
 auto
-Scalar<N, C, T>::operator+=(detail::scalar_round_up_t<N, C, T> v) -> self_type & {
+Scalar<N, C, T>::operator+=(detail::scalar_round_up_t<N, C, T> v) -> self_type& {
   _n += v._n;
   return *this;
 }
-template <intmax_t N, typename C, typename T>
+
+template<intmax_t N, typename C, typename T>
 auto
-Scalar<N, C, T>::operator+=(detail::scalar_round_down_t<N, C, T> v) -> self_type & {
+Scalar<N, C, T>::operator+=(detail::scalar_round_down_t<N, C, T> v) -> self_type& {
   _n += v._n;
   return *this;
 }
 
-template <intmax_t N, typename C, intmax_t S, typename I, typename T>
+template<intmax_t N, typename C, intmax_t S, typename I, typename T>
 auto
-operator+(Scalar<N, C, T> lhs, Scalar<S, I, T> const &rhs) -> typename std::common_type<Scalar<N, C, T>, Scalar<S, I, T>>::type {
+operator+(Scalar<N, C, T> lhs
+          , Scalar<S, I, T> const& rhs) -> typename std::common_type<Scalar<N, C, T>, Scalar<S, I, T>>::type {
   return typename std::common_type<Scalar<N, C, T>, Scalar<S, I, T>>::type(lhs) += rhs;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 Scalar<N, C, T>
-operator+(Scalar<N, C, T> const &lhs, Scalar<N, C, T> const &rhs) {
+operator+(Scalar<N, C, T> const& lhs, Scalar<N, C, T> const& rhs) {
   return Scalar<N, C, T>(lhs) += rhs;
 }
 
-template <intmax_t N, typename C, typename T, typename I>
+template<intmax_t N, typename C, typename T, typename I>
 Scalar<N, C, T>
-operator+(detail::scalar_unit_round_up_t<I> lhs, Scalar<N, C, T> const &rhs) {
+operator+(detail::scalar_unit_round_up_t<I> lhs, Scalar<N, C, T> const& rhs) {
   return Scalar<N, C, T>(rhs) += lhs;
 }
 
-template <intmax_t N, typename C, typename T, typename I>
+template<intmax_t N, typename C, typename T, typename I>
 Scalar<N, C, T>
-operator+(Scalar<N, C, T> const &lhs, detail::scalar_unit_round_up_t<I> rhs) {
+operator+(Scalar<N, C, T> const& lhs, detail::scalar_unit_round_up_t<I> rhs) {
   return Scalar<N, C, T>(lhs) += rhs;
 }
 
-template <intmax_t N, typename C, typename T, typename I>
+template<intmax_t N, typename C, typename T, typename I>
 Scalar<N, C, T>
-operator+(detail::scalar_unit_round_down_t<I> lhs, Scalar<N, C, T> const &rhs) {
+operator+(detail::scalar_unit_round_down_t<I> lhs, Scalar<N, C, T> const& rhs) {
   return Scalar<N, C, T>(rhs) += lhs;
 }
-template <intmax_t N, typename C, typename T, typename I>
+
+template<intmax_t N, typename C, typename T, typename I>
 Scalar<N, C, T>
-operator+(Scalar<N, C, T> const &lhs, detail::scalar_unit_round_down_t<I> rhs) {
+operator+(Scalar<N, C, T> const& lhs, detail::scalar_unit_round_down_t<I> rhs) {
   return Scalar<N, C, T>(lhs) += rhs;
 }
-template <intmax_t N, typename C, typename T>
+
+template<intmax_t N, typename C, typename T>
 Scalar<N, C, T>
-operator+(detail::scalar_round_up_t<N, C, T> lhs, Scalar<N, C, T> const &rhs) {
+operator+(detail::scalar_round_up_t<N, C, T> lhs, Scalar<N, C, T> const& rhs) {
   return Scalar<N, C, T>(rhs) += lhs._n;
 }
-template <intmax_t N, typename C, typename T>
+
+template<intmax_t N, typename C, typename T>
 Scalar<N, C, T>
-operator+(Scalar<N, C, T> const &lhs, detail::scalar_round_up_t<N, C, T> rhs) {
+operator+(Scalar<N, C, T> const& lhs, detail::scalar_round_up_t<N, C, T> rhs) {
   return Scalar<N, C, T>(lhs) += rhs._n;
 }
-template <intmax_t N, typename C, typename T>
+
+template<intmax_t N, typename C, typename T>
 Scalar<N, C, T>
-operator+(detail::scalar_round_down_t<N, C, T> lhs, Scalar<N, C, T> const &rhs) {
+operator+(detail::scalar_round_down_t<N, C, T> lhs, Scalar<N, C, T> const& rhs) {
   return Scalar<N, C, T>(rhs) += lhs._n;
 }
-template <intmax_t N, typename C, typename T>
+
+template<intmax_t N, typename C, typename T>
 Scalar<N, C, T>
-operator+(Scalar<N, C, T> const &lhs, detail::scalar_round_down_t<N, C, T> rhs) {
+operator+(Scalar<N, C, T> const& lhs, detail::scalar_round_down_t<N, C, T> rhs) {
   return Scalar<N, C, T>(lhs) += rhs._n;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 auto
-Scalar<N, C, T>::operator-=(self_type const &that) -> self_type & {
+Scalar<N, C, T>::operator-=(self_type const& that) -> self_type& {
   _n -= that._n;
   return *this;
 }
 
-template <intmax_t N, typename C, typename T>
-template <intmax_t S, typename I>
+template<intmax_t N, typename C, typename T>
+template<intmax_t S, typename I>
 auto
-Scalar<N, C, T>::operator-=(Scalar<S, I, T> const &that) -> self_type & {
+Scalar<N, C, T>::operator-=(Scalar<S, I, T> const& that) -> self_type& {
   typedef std::ratio<S, N> R;
-  static_assert(R::den == 1, "Subtraction not permitted - target scale is not an integral multiple of source scale.");
+  static_assert(R::den ==
+                1, "Subtraction not permitted - target scale is not an integral multiple of source scale.");
   _n -= that.count() * R::num;
   return *this;
 }
 
-template <intmax_t N, typename C, typename T>
-template <typename I>
+template<intmax_t N, typename C, typename T>
+template<typename I>
 auto
-Scalar<N, C, T>::operator-=(detail::scalar_unit_round_up_t<I> v) -> self_type & {
+Scalar<N, C, T>::operator-=(detail::scalar_unit_round_up_t<I> v) -> self_type& {
   _n -= v.template scale<N, C>();
   return *this;
 }
-template <intmax_t N, typename C, typename T>
-template <typename I>
+
+template<intmax_t N, typename C, typename T>
+template<typename I>
 auto
-Scalar<N, C, T>::operator-=(detail::scalar_unit_round_down_t<I> v) -> self_type & {
+Scalar<N, C, T>::operator-=(detail::scalar_unit_round_down_t<I> v) -> self_type& {
   _n -= v.template scale<N, C>();
   return *this;
 }
-template <intmax_t N, typename C, typename T>
+
+template<intmax_t N, typename C, typename T>
 auto
-Scalar<N, C, T>::operator-=(detail::scalar_round_up_t<N, C, T> v) -> self_type & {
+Scalar<N, C, T>::operator-=(detail::scalar_round_up_t<N, C, T> v) -> self_type& {
   _n -= v._n;
   return *this;
 }
-template <intmax_t N, typename C, typename T>
+
+template<intmax_t N, typename C, typename T>
 auto
-Scalar<N, C, T>::operator-=(detail::scalar_round_down_t<N, C, T> v) -> self_type & {
+Scalar<N, C, T>::operator-=(detail::scalar_round_down_t<N, C, T> v) -> self_type& {
   _n -= v._n;
   return *this;
 }
 
-template <intmax_t N, typename C, intmax_t S, typename I, typename T>
+template<intmax_t N, typename C, intmax_t S, typename I, typename T>
 auto
-operator-(Scalar<N, C, T> lhs, Scalar<S, I, T> const &rhs) -> typename std::common_type<Scalar<N, C, T>, Scalar<S, I, T>>::type {
+operator-(Scalar<N, C, T> lhs
+          , Scalar<S, I, T> const& rhs) -> typename std::common_type<Scalar<N, C, T>, Scalar<S, I, T>>::type {
   return typename std::common_type<Scalar<N, C, T>, Scalar<S, I, T>>::type(lhs) -= rhs;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 Scalar<N, C, T>
-operator-(Scalar<N, C, T> const &lhs, Scalar<N, C, T> const &rhs) {
+operator-(Scalar<N, C, T> const& lhs, Scalar<N, C, T> const& rhs) {
   return Scalar<N, C, T>(lhs) -= rhs;
 }
 
-template <intmax_t N, typename C, typename T, typename I>
+template<intmax_t N, typename C, typename T, typename I>
 Scalar<N, C, T>
-operator-(detail::scalar_unit_round_up_t<I> lhs, Scalar<N, C, T> const &rhs) {
+operator-(detail::scalar_unit_round_up_t<I> lhs, Scalar<N, C, T> const& rhs) {
   return Scalar<N, C, T>(lhs.template scale<N, C>()) -= rhs;
 }
 
-template <intmax_t N, typename C, typename T, typename I>
+template<intmax_t N, typename C, typename T, typename I>
 Scalar<N, C, T>
-operator-(Scalar<N, C, T> const &lhs, detail::scalar_unit_round_up_t<I> rhs) {
+operator-(Scalar<N, C, T> const& lhs, detail::scalar_unit_round_up_t<I> rhs) {
   return Scalar<N, C, T>(lhs) -= rhs;
 }
 
-template <intmax_t N, typename C, typename T, typename I>
+template<intmax_t N, typename C, typename T, typename I>
 Scalar<N, C, T>
-operator-(detail::scalar_unit_round_down_t<I> lhs, Scalar<N, C, T> const &rhs) {
+operator-(detail::scalar_unit_round_down_t<I> lhs, Scalar<N, C, T> const& rhs) {
   return Scalar<N, C, T>(lhs.template scale<N, C>()) -= rhs;
 }
 
-template <intmax_t N, typename C, typename T, typename I>
+template<intmax_t N, typename C, typename T, typename I>
 Scalar<N, C, T>
-operator-(Scalar<N, C, T> const &lhs, detail::scalar_unit_round_down_t<I> rhs) {
+operator-(Scalar<N, C, T> const& lhs, detail::scalar_unit_round_down_t<I> rhs) {
   return Scalar<N, C, T>(lhs) -= rhs;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 Scalar<N, C, T>
-operator-(detail::scalar_round_up_t<N, C, T> lhs, Scalar<N, C, T> const &rhs) {
+operator-(detail::scalar_round_up_t<N, C, T> lhs, Scalar<N, C, T> const& rhs) {
   return Scalar<N, C, T>(lhs._n) -= rhs;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 Scalar<N, C, T>
-operator-(Scalar<N, C, T> const &lhs, detail::scalar_round_up_t<N, C, T> rhs) {
+operator-(Scalar<N, C, T> const& lhs, detail::scalar_round_up_t<N, C, T> rhs) {
   return Scalar<N, C, T>(lhs) -= rhs._n;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 Scalar<N, C, T>
-operator-(detail::scalar_round_down_t<N, C, T> lhs, Scalar<N, C, T> const &rhs) {
+operator-(detail::scalar_round_down_t<N, C, T> lhs, Scalar<N, C, T> const& rhs) {
   return Scalar<N, C, T>(lhs._n) -= rhs;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 Scalar<N, C, T>
-operator-(Scalar<N, C, T> const &lhs, detail::scalar_round_down_t<N, C, T> rhs) {
+operator-(Scalar<N, C, T> const& lhs, detail::scalar_round_down_t<N, C, T> rhs) {
   return Scalar<N, C, T>(lhs) -= rhs._n;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 auto
-Scalar<N, C, T>::operator++() -> self_type & {
+Scalar<N, C, T>::operator++() -> self_type& {
   ++_n;
   return *this;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 auto
 Scalar<N, C, T>::operator++(int) -> self_type {
   self_type zret(*this);
@@ -782,14 +834,14 @@ Scalar<N, C, T>::operator++(int) -> self_type {
   return zret;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 auto
-Scalar<N, C, T>::operator--() -> self_type & {
+Scalar<N, C, T>::operator--() -> self_type& {
   --_n;
   return *this;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 auto
 Scalar<N, C, T>::operator--(int) -> self_type {
   self_type zret(*this);
@@ -797,80 +849,89 @@ Scalar<N, C, T>::operator--(int) -> self_type {
   return zret;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 auto
-Scalar<N, C, T>::inc(Counter n) -> self_type & {
+Scalar<N, C, T>::inc(Counter n) -> self_type& {
   _n += n;
   return *this;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 auto
-Scalar<N, C, T>::dec(Counter n) -> self_type & {
+Scalar<N, C, T>::dec(Counter n) -> self_type& {
   _n -= n;
   return *this;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 auto
-Scalar<N, C, T>::operator*=(C n) -> self_type & {
+Scalar<N, C, T>::operator*=(C n) -> self_type& {
   _n *= n;
   return *this;
 }
 
-template <intmax_t N, typename C, typename T> Scalar<N, C, T> operator*(Scalar<N, C, T> const &lhs, C n) {
+template<intmax_t N, typename C, typename T>
+Scalar<N, C, T> operator*(Scalar<N, C, T> const& lhs, C n) {
   return Scalar<N, C, T>(lhs) *= n;
 }
-template <intmax_t N, typename C, typename T> Scalar<N, C, T> operator*(C n, Scalar<N, C, T> const &rhs) {
+
+template<intmax_t N, typename C, typename T>
+Scalar<N, C, T> operator*(C n, Scalar<N, C, T> const& rhs) {
   return Scalar<N, C, T>(rhs) *= n;
 }
-template <intmax_t N, typename C, typename T> Scalar<N, C, T> operator*(Scalar<N, C, T> const &lhs, int n) {
+
+template<intmax_t N, typename C, typename T>
+Scalar<N, C, T> operator*(Scalar<N, C, T> const& lhs, int n) {
   return Scalar<N, C, T>(lhs) *= n;
 }
-template <intmax_t N, typename C, typename T> Scalar<N, C, T> operator*(int n, Scalar<N, C, T> const &rhs) {
+
+template<intmax_t N, typename C, typename T>
+Scalar<N, C, T> operator*(int n, Scalar<N, C, T> const& rhs) {
   return Scalar<N, C, T>(rhs) *= n;
 }
-template <intmax_t N> Scalar<N, int> operator*(Scalar<N, int> const &lhs, int n) {
+
+template<intmax_t N> Scalar<N, int> operator*(Scalar<N, int> const& lhs, int n) {
   return Scalar<N, int>(lhs) *= n;
 }
-template <intmax_t N> Scalar<N, int> operator*(int n, Scalar<N, int> const &rhs) {
+
+template<intmax_t N> Scalar<N, int> operator*(int n, Scalar<N, int> const& rhs) {
   return Scalar<N, int>(rhs) *= n;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 auto
-Scalar<N, C, T>::operator/=(C n) -> self_type & {
+Scalar<N, C, T>::operator/=(C n) -> self_type& {
   _n /= n;
   return *this;
 }
 
-template <intmax_t N, typename C, intmax_t S, typename I, typename T>
+template<intmax_t N, typename C, intmax_t S, typename I, typename T>
 auto
 operator/(Scalar<N, C, T> lhs, Scalar<S, I, T> rhs) -> typename std::common_type<C, I>::type {
   using R = std::ratio<N, S>;
   return (lhs.count() * R::num) / (rhs.count() * R::den);
 }
 
-template <intmax_t N, typename C, typename T, typename I>
+template<intmax_t N, typename C, typename T, typename I>
 Scalar<N, C, T>
 operator/(Scalar<N, C, T> lhs, I n) {
   static_assert(std::is_integral<I>::value, "Scalar divsion only support integral types.");
   return Scalar<N, C, T>(lhs) /= n;
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 auto
 Scalar<N, C, T>::operator()(Counter n) const -> self_type {
   return self_type{n};
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 auto
 Scalar<N, C, T>::plus(Counter n) const -> self_type {
   return {_n + n};
 }
 
-template <intmax_t N, typename C, typename T>
+template<intmax_t N, typename C, typename T>
 auto
 Scalar<N, C, T>::minus(Counter n) const -> self_type {
   return {_n - n};
@@ -889,7 +950,7 @@ Scalar<N, C, T>::minus(Counter n) const -> self_type {
  * int r = swoc::round_up<10>(121); // r becomes 130.
  * @endcode
  */
-template <intmax_t N, typename C>
+template<intmax_t N, typename C>
 C
 round_up(C value) {
   return N * detail::scale_conversion_round_up<N, 1>(value);
@@ -908,32 +969,31 @@ round_up(C value) {
  * int r = swoc::round_down<10>(121); // r becomes 120.
  * @endcode
  */
-template <intmax_t N, typename C>
+template<intmax_t N, typename C>
 C
 round_down(C value) {
   return N * detail::scale_conversion_round_down<N, 1>(value);
 }
 
-namespace detail
-{
-  template <typename T>
-  auto
-  tag_label(std::ostream &, const meta::CaseTag<0> &) -> void {}
-
-  template <typename T>
-  auto
-  tag_label(std::ostream &w, const meta::CaseTag<1> &) -> decltype(T::label, meta::TypeFunc<void>()) {
-    w << T::label;
-  }
+namespace detail {
+template<typename T>
+auto
+tag_label(std::ostream&, const meta::CaseTag<0>&) -> void {}
 
-  template <typename T>
-  inline std::ostream &
-  tag_label(std::ostream &w) {
-    tag_label<T>(w, meta::CaseArg);
-    return w;
-  }
+template<typename T>
+auto
+tag_label(std::ostream& w, const meta::CaseTag<1>&) -> decltype(T::label, meta::TypeFunc<void>()) {
+  w << T::label;
+}
+
+template<typename T>
+inline std::ostream&
+tag_label(std::ostream& w) {
+  tag_label<T>(w, meta::CaseArg);
+  return w;
+}
 } // namespace detail
-} // namespace SWOC_NAMESPACE
+}} // namespace SWOC_NAMESPACE
 
 namespace std
 {
diff --git a/swoc++/include/swoc/TextView.h b/swoc++/include/swoc/TextView.h
index e53a198..23072bc 100644
--- a/swoc++/include/swoc/TextView.h
+++ b/swoc++/include/swoc/TextView.h
@@ -71,8 +71,8 @@ strcmp(const std::string_view &lhs, const std::string_view &rhs) {
   return memcmp(lhs, rhs);
 }
 
-namespace SWOC_NAMESPACE
-{
+namespace swoc { inline namespace SWOC_VERSION_NS {
+
 class TextView;
 
 /** A read only view of a contiguous piece of memory.
@@ -1644,12 +1644,11 @@ namespace literals
   constexpr swoc::TextView operator"" _tv(const char *s, size_t n) { return {s, n}; }
 } // namespace literals
 
-}; // namespace SWOC_NAMESPACE
+}} // namespace SWOC_NAMESPACE
 
-namespace std
-{
+namespace std {
 /// Write the contents of @a view to the stream @a os.
-ostream &operator<<(ostream &os, const swoc::TextView &view);
+ostream& operator<<(ostream& os, const swoc::TextView& view);
 
 /// @cond INTERNAL_DETAIL
 /* For interaction with specific STL interfaces, primarily std::filesystem. Along with the
@@ -1657,18 +1656,18 @@ ostream &operator<<(ostream &os, const swoc::TextView &view);
  * even if the internal view is not nul terminated.
  * @note Putting these directly in the class doesn't seem to work.
  */
-template <> struct iterator_traits<swoc::TextView> {
+template<> struct iterator_traits<swoc::TextView> {
   using value_type        = char;
   using pointer_type      = const char *;
-  using reference_type    = const char &;
+  using reference_type    = const char&;
   using difference_type   = ssize_t;
   using iterator_category = forward_iterator_tag;
 };
 
-template <typename X, typename V> struct iterator_traits<swoc::TransformView<X, V>> {
+template<typename X, typename V> struct iterator_traits<swoc::TransformView<X, V>> {
   using value_type        = typename swoc::TransformView<X, V>::value_type;
   using pointer_type      = const value_type *;
-  using reference_type    = const value_type &;
+  using reference_type    = const value_type&;
   using difference_type   = ssize_t;
   using iterator_category = forward_iterator_tag;
 };
diff --git a/swoc++/include/swoc/bwf_base.h b/swoc++/include/swoc/bwf_base.h
index fb093c7..0263ee2 100644
--- a/swoc++/include/swoc/bwf_base.h
+++ b/swoc++/include/swoc/bwf_base.h
@@ -26,817 +26,785 @@
 #include "swoc/BufferWriter.h"
 #include "swoc/swoc_meta.h"
 
-namespace SWOC_NAMESPACE
-{
-namespace bwf
-{
-  /** Parsed version of a format specifier.
-   *
-   * Literals are represented as an instance of this class, with the type set to
-   * @c LITERAL_TYPE and the literal text in the @a _ext field.
-   */
-  struct Spec {
-    using self_type = Spec; ///< Self reference type.
-
-    static constexpr char DEFAULT_TYPE = 'g'; ///< Default format type.
-    static constexpr char INVALID_TYPE = 0;   ///< Type for missing or invalid specifier.
-    static constexpr char LITERAL_TYPE = '"'; ///< Internal type to mark a literal.
-    static constexpr char CAPTURE_TYPE = 1;   ///< Internal type to mark a capture.
-
-    static constexpr char SIGN_ALWAYS = '+'; ///< Always print a sign character.
-    static constexpr char SIGN_NEVER  = ' '; ///< Never print a sign character.
-    static constexpr char SIGN_NEG    = '-'; ///< Print a sign character only for negative values (default).
-
-    /// Constructor a default instance.
-    constexpr Spec() {}
-
-    /// Construct by parsing @a fmt.
-    Spec(const TextView &fmt);
-    /// Parse a specifier.
-    /// State is not reset, @a this should be default constructed before calling.
-    bool parse(TextView fmt);
-
-    char _fill = ' ';      ///< Fill character.
-    char _sign = SIGN_NEG; ///< Numeric sign style.
-    /// Flag for how to align the output inside a limited width field.
-    enum class Align : char {
-      NONE,                            ///< No alignment.
-      LEFT,                            ///< Left alignment '<'.
-      RIGHT,                           ///< Right alignment '>'.
-      CENTER,                          ///< Center alignment '^'.
-      SIGN                             ///< Align plus/minus sign before numeric fill. '='
-    } _align           = Align::NONE;  ///< Output field alignment.
-    char _type         = DEFAULT_TYPE; ///< Type / radix indicator.
-    bool _radix_lead_p = false;        ///< Print leading radix indication.
-    // @a _min is unsigned because there's no point in an invalid default, 0 works fine.
-    unsigned int _min = 0;                                        ///< Minimum width.
-    int _prec         = -1;                                       ///< Precision
-    unsigned int _max = std::numeric_limits<unsigned int>::max(); ///< Maximum width
-    int _idx          = -1;                                       ///< Positional "name" of the specification.
-    std::string_view _name;                                       ///< Name of the specification.
-    std::string_view _ext;                                        ///< Extension if provided.
-
-    /// Global default instance for use in situations where a format specifier isn't available.
-    static const self_type DEFAULT;
-
-    /// Validate @a c is a specifier type indicator.
-    static bool is_type(char c);
-
-    /// Check if the type flag is numeric.
-    static bool is_numeric_type(char c);
-
-    /// Check if the type is an upper case variant.
-    static bool is_upper_case_type(char c);
-
-    /// Check if the type @a in @a this is numeric.
-    bool has_numeric_type() const;
-
-    /// Check if the type in @a this is an upper case variant.
-    bool has_upper_case_type() const;
-
-    /// Check if the type is a raw pointer.
-    bool has_pointer_type() const;
-
-    /// Check if the type is valid.
-    bool has_valid_type() const;
+namespace swoc { inline namespace SWOC_VERSION_NS {
+namespace bwf {
+/** Parsed version of a format specifier.
+ *
+ * Literals are represented as an instance of this class, with the type set to
+ * @c LITERAL_TYPE and the literal text in the @a _ext field.
+ */
+struct Spec {
+  using self_type = Spec; ///< Self reference type.
+
+  static constexpr char DEFAULT_TYPE = 'g'; ///< Default format type.
+  static constexpr char INVALID_TYPE = 0;   ///< Type for missing or invalid specifier.
+  static constexpr char LITERAL_TYPE = '"'; ///< Internal type to mark a literal.
+  static constexpr char CAPTURE_TYPE = 1;   ///< Internal type to mark a capture.
+
+  static constexpr char SIGN_ALWAYS = '+'; ///< Always print a sign character.
+  static constexpr char SIGN_NEVER = ' '; ///< Never print a sign character.
+  static constexpr char SIGN_NEG = '-'; ///< Print a sign character only for negative values (default).
+
+  /// Constructor a default instance.
+  constexpr Spec() {}
+
+  /// Construct by parsing @a fmt.
+  Spec(const TextView& fmt);
+
+  /// Parse a specifier.
+  /// State is not reset, @a this should be default constructed before calling.
+  bool parse(TextView fmt);
+
+  char _fill = ' ';      ///< Fill character.
+  char _sign = SIGN_NEG; ///< Numeric sign style.
+  /// Flag for how to align the output inside a limited width field.
+  enum class Align : char {
+    NONE,                            ///< No alignment.
+    LEFT,                            ///< Left alignment '<'.
+    RIGHT,                           ///< Right alignment '>'.
+    CENTER,                          ///< Center alignment '^'.
+    SIGN                             ///< Align plus/minus sign before numeric fill. '='
+  } _align = Align::NONE;  ///< Output field alignment.
+  char _type = DEFAULT_TYPE; ///< Type / radix indicator.
+  bool _radix_lead_p = false;        ///< Print leading radix indication.
+  // @a _min is unsigned because there's no point in an invalid default, 0 works fine.
+  unsigned int _min = 0;                                        ///< Minimum width.
+  int _prec = -1;                                       ///< Precision
+  unsigned int _max = std::numeric_limits<unsigned int>::max(); ///< Maximum width
+  int _idx = -1;                                       ///< Positional "name" of the specification.
+  std::string_view _name;                                       ///< Name of the specification.
+  std::string_view _ext;                                        ///< Extension if provided.
+
+  /// Global default instance for use in situations where a format specifier isn't available.
+  static const self_type DEFAULT;
+
+  /// Validate @a c is a specifier type indicator.
+  static bool is_type(char c);
+
+  /// Check if the type flag is numeric.
+  static bool is_numeric_type(char c);
+
+  /// Check if the type is an upper case variant.
+  static bool is_upper_case_type(char c);
+
+  /// Check if the type @a in @a this is numeric.
+  bool has_numeric_type() const;
+
+  /// Check if the type in @a this is an upper case variant.
+  bool has_upper_case_type() const;
+
+  /// Check if the type is a raw pointer.
+  bool has_pointer_type() const;
+
+  /// Check if the type is valid.
+  bool has_valid_type() const;
+
+protected:
+  /// Validate character is alignment character and return the appropriate enum value.
+  Align align_of(char c);
+
+  /// Validate is sign indicator.
+  bool is_sign(char c);
+
+  /// Handrolled initialization the character syntactic property data.
+  static const struct Property {
+    Property(); ///< Default constructor, creates initialized flag set.
+    /// Flag storage, indexed by character value.
+    uint8_t _data[0x100];
+    /// Flag mask values.
+    static constexpr uint8_t ALIGN_MASK = 0x0F; ///< Alignment type.
+    static constexpr uint8_t TYPE_CHAR = 0x10; ///< A valid type character.
+    static constexpr uint8_t UPPER_TYPE_CHAR = 0x20; ///< Upper case flag.
+    static constexpr uint8_t NUMERIC_TYPE_CHAR = 0x40; ///< Numeric output.
+    static constexpr uint8_t SIGN_CHAR = 0x80; ///< Is sign character.
+  } _prop;
+};
 
-  protected:
-    /// Validate character is alignment character and return the appropriate enum value.
-    Align align_of(char c);
-
-    /// Validate is sign indicator.
-    bool is_sign(char c);
-
-    /// Handrolled initialization the character syntactic property data.
-    static const struct Property {
-      Property(); ///< Default constructor, creates initialized flag set.
-      /// Flag storage, indexed by character value.
-      uint8_t _data[0x100];
-      /// Flag mask values.
-      static constexpr uint8_t ALIGN_MASK        = 0x0F; ///< Alignment type.
-      static constexpr uint8_t TYPE_CHAR         = 0x10; ///< A valid type character.
-      static constexpr uint8_t UPPER_TYPE_CHAR   = 0x20; ///< Upper case flag.
-      static constexpr uint8_t NUMERIC_TYPE_CHAR = 0x40; ///< Numeric output.
-      static constexpr uint8_t SIGN_CHAR         = 0x80; ///< Is sign character.
-    } _prop;
-  };
+/** Format string support.
+ *
+ * This contains the parsing logic for format strings and also serves as the type for pre-compiled
+ * format string.
+ *
+ * When used by the print formatting logic, there is an abstraction layer, "extraction", which
+ * performs the equivalent of the @c parse method. This allows the formatting to treat
+ * pre-compiled or immediately parsed format strings the same. It also enables formatted print
+ * support any parser that can deliver literals and @c Spec instances.
+ */
+class Format {
+public:
+  /// Construct from a format string @a fmt.
+  Format(TextView fmt);
 
-  /** Format string support.
-   *
-   * This contains the parsing logic for format strings and also serves as the type for pre-compiled
-   * format string.
-   *
-   * When used by the print formatting logic, there is an abstraction layer, "extraction", which
-   * performs the equivalent of the @c parse method. This allows the formatting to treat
-   * pre-compiled or immediately parsed format strings the same. It also enables formatted print
-   * support any parser that can deliver literals and @c Spec instances.
-   */
-  class Format
-  {
-  public:
-    /// Construct from a format string @a fmt.
-    Format(TextView fmt);
+  /// Extraction support for TextView.
+  struct TextViewExtractor {
+    TextView _fmt; ///< Format string.
+
+    /// @return @c true if more format string, @c false if none.
+    explicit operator bool() const;
+
+    /** Extract next formatting elements.
+     *
+     * @param literal_v [out] The next literal.
+     * @param spec [out] The next format specifier.
+     * @return @c true if @a spec was filled out, @c false if no specifier was found.
+     */
+    bool operator()(std::string_view& literal_v, Spec& spec);
 
-    /// Extraction support for TextView.
-    struct TextViewExtractor {
-      TextView _fmt; ///< Format string.
+    /** Parse elements of a format string.
 
-      /// @return @c true if more format string, @c false if none.
-      explicit operator bool() const;
+        @param fmt The format string [in|out]
+        @param literal A literal if found
+        @param specifier A specifier if found (less enclosing braces)
+        @return @c true if a specifier was found, @c false if not.
 
-      /** Extract next formatting elements.
-       *
-       * @param literal_v [out] The next literal.
-       * @param spec [out] The next format specifier.
-       * @return @c true if @a spec was filled out, @c false if no specifier was found.
-       */
-      bool operator()(std::string_view &literal_v, Spec &spec);
+        Pull off the next literal and/or specifier from @a fmt. The return value distinguishes
+        the case of no specifier found (@c false) or an empty specifier (@c true).
 
-      /** Parse elements of a format string.
+     */
+    static bool parse(TextView& fmt, std::string_view& literal, std::string_view& specifier);
+  };
 
-          @param fmt The format string [in|out]
-          @param literal A literal if found
-          @param specifier A specifier if found (less enclosing braces)
-          @return @c true if a specifier was found, @c false if not.
+  /// Wrap the format string in an extractor.
+  static TextViewExtractor bind(TextView fmt);
 
-          Pull off the next literal and/or specifier from @a fmt. The return value distinguishes
-          the case of no specifier found (@c false) or an empty specifier (@c true).
+  /// Extraction support for pre-parsed format strings.
+  struct FormatExtractor {
+    const std::vector<Spec>& _fmt; ///< Parsed format string.
+    int _idx = 0;                  ///< Element index.
+    explicit operator bool() const;
 
-       */
-      static bool parse(TextView &fmt, std::string_view &literal, std::string_view &specifier);
-    };
+    bool operator()(std::string_view& literal_v, Spec& spec);
+  };
 
-    /// Wrap the format string in an extractor.
-    static TextViewExtractor bind(TextView fmt);
+  /// Wrap the format instance in an extractor.
+  FormatExtractor bind() const;
 
-    /// Extraction support for pre-parsed format strings.
-    struct FormatExtractor {
-      const std::vector<Spec> &_fmt; ///< Parsed format string.
-      int _idx = 0;                  ///< Element index.
-      explicit operator bool() const;
-      bool operator()(std::string_view &literal_v, Spec &spec);
-    };
+protected:
+  /// Default constructor for use by subclasses with alternate formatting.
+  Format() = default;
 
-    /// Wrap the format instance in an extractor.
-    FormatExtractor bind() const;
+  std::vector<Spec> _items; ///< Items from format string.
+};
 
-  protected:
-    /// Default constructor for use by subclasses with alternate formatting.
-    Format() = default;
+// Name binding - support for having format specifier names.
 
-    std::vector<Spec> _items; ///< Items from format string.
-  };
+/** Signature for a functor bound to a name.
+ *
+ * @param w The output.
+ * @param spec The format specifier.
+ *
+ * The functor is expected to write to @a w based on @a spec.
+ */
+using ExternalGeneratorSignature = BufferWriter&(BufferWriter& w, Spec const& spec);
 
-  // Name binding - support for having format specifier names.
+/** Base class for implementing a name binding functor.
+ *
+ * This expected to be inherited by other classes that provide the name binding service.
+ * It does a few small but handy things.
+ *
+ * - Force a virtual destructor.
+ * - Force the implementation of the binding method by declaring it as a pure virtual.
+ * - Provide a standard "missing name" method.
+ */
+class NameBinding {
+public:
+  virtual ~NameBinding(); ///< Force virtual destructor.
 
-  /** Signature for a functor bound to a name.
+  /** Generate output text for @a name on the output @a w using the format specifier @a spec.
+   * This must match the @c BoundNameSignature type.
    *
-   * @param w The output.
-   * @param spec The format specifier.
+   * @param w Output stream.
+   * @param spec Parsed format specifier.
    *
-   * The functor is expected to write to @a w based on @a spec.
+   * @note The tag name can be found in @c spec._name.
+   *
+   * @return @a w
    */
-  using ExternalGeneratorSignature = BufferWriter &(BufferWriter &w, Spec const &spec);
+  virtual BufferWriter& operator()(BufferWriter& w, Spec const& spec) const = 0;
 
-  /** Base class for implementing a name binding functor.
+protected:
+  /** Standardized missing name method.
    *
-   * This expected to be inherited by other classes that provide the name binding service.
-   * It does a few small but handy things.
-   *
-   * - Force a virtual destructor.
-   * - Force the implementation of the binding method by declaring it as a pure virtual.
-   * - Provide a standard "missing name" method.
+   * @param w The destination buffer.
+   * @param spec Format specifier, used to determine the invalid name.
+   * @return @a w
    */
-  class NameBinding
-  {
-  public:
-    virtual ~NameBinding(); ///< Force virtual destructor.
+  static BufferWriter& err_invalid_name(BufferWriter& w, Spec const& spec);
+};
 
-    /** Generate output text for @a name on the output @a w using the format specifier @a spec.
-     * This must match the @c BoundNameSignature type.
-     *
-     * @param w Output stream.
-     * @param spec Parsed format specifier.
-     *
-     * @note The tag name can be found in @c spec._name.
-     *
-     * @return @a w
-     */
-    virtual BufferWriter &operator()(BufferWriter &w, Spec const &spec) const = 0;
+/** An explicitly empty set of bound names.
+ *
+ * To simplify the overall implementation, a name binding is always required to format output.
+ * This class is used in situations where there is no available binding or such names would not be
+ * useful. This class with @c throw on any attempt to use a name.
+ */
+class NilBinding : public NameBinding {
+public:
+  /// Do name based formatted output.
+  /// This always throws an exception.
+  BufferWriter& operator()(BufferWriter&, Spec const&) const override;
+};
 
-  protected:
-    /** Standardized missing name method.
-     *
-     * @param w The destination buffer.
-     * @param spec Format specifier, used to determine the invalid name.
-     * @return @a w
-     */
-    static BufferWriter &err_invalid_name(BufferWriter &w, Spec const &spec);
-  };
+/** Associate generators with names.
+ *
+ *  @tparam F The function signature for generators in this container.
+ *
+ * This is a base class used by different types of name containers. It is not expected to be used
+ * directly. A subclass should inherit from this by providing a function type @a F that is
+ * suitable for the subclass generators.
+ */
+template<typename F> class NameMap {
+private:
+  using self_type = NameMap; ///< self reference type.
+public:
+  /// Signature for generators.
+  using Generator = std::function<F>;
 
-  /** An explicitly empty set of bound names.
-   *
-   * To simplify the overall implementation, a name binding is always required to format output.
-   * This class is used in situations where there is no available binding or such names would not be
-   * useful. This class with @c throw on any attempt to use a name.
-   */
-  class NilBinding : public NameBinding
-  {
-  public:
-    /// Do name based formatted output.
-    /// This always throws an exception.
-    BufferWriter &operator()(BufferWriter &, Spec const &) const override;
-  };
+  /// Construct an empty container.
+  NameMap();
 
-  /** Associate generators with names.
-   *
-   *  @tparam F The function signature for generators in this container.
+  /// Construct and assign the names and generators in @a list
+  NameMap(std::initializer_list<std::tuple<std::string_view, Generator const&>> list);
+
+  /** Assign the @a generator to the @a name.
    *
-   * This is a base class used by different types of name containers. It is not expected to be used
-   * directly. A subclass should inherit from this by providing a function type @a F that is
-   * suitable for the subclass generators.
+   * @param name Name associated with the @a generator.
+   * @param generator The generator function.
    */
-  template <typename F> class NameMap
-  {
-  private:
-    using self_type = NameMap; ///< self reference type.
-  public:
-    /// Signature for generators.
-    using Generator = std::function<F>;
+  self_type& assign(std::string_view const& name, Generator const& generator);
 
-    /// Construct an empty container.
-    NameMap();
-    /// Construct and assign the names and generators in @a list
-    NameMap(std::initializer_list<std::tuple<std::string_view, Generator const &>> list);
+protected:
+  /// Copy @a name in to local storage and return a view of it.
+  std::string_view localize(std::string_view const& name);
 
-    /** Assign the @a generator to the @a name.
-     *
-     * @param name Name associated with the @a generator.
-     * @param generator The generator function.
-     */
-    self_type &assign(std::string_view const &name, Generator const &generator);
+  using Map = std::unordered_map<std::string_view, Generator>;
+  Map _map;              ///< Mapping of name -> generator
+  MemArena _arena{1024}; ///< Local name storage.
+};
 
-  protected:
-    /// Copy @a name in to local storage and return a view of it.
-    std::string_view localize(std::string_view const &name);
+/** A class to hold external / context-free name bindings.
+ *
+ * These names access external data and therefore have no context. An externally accessible
+ * singleton instance of this is used as the default if no explicit name set is provided. This
+ * enables the executable to establish a set of global names to be used.
+ */
+class ExternalNames : public NameMap<ExternalGeneratorSignature>, public NameBinding {
+  using self_type  = ExternalNames;                       ///< Self reference type.
+  using super_type = NameMap<ExternalGeneratorSignature>; ///< Super class.
+  using Map        = super_type::Map;                     ///< Inherit from superclass.
 
-    using Map = std::unordered_map<std::string_view, Generator>;
-    Map _map;              ///< Mapping of name -> generator
-    MemArena _arena{1024}; ///< Local name storage.
-  };
+public:
+  using super_type::super_type; // import constructors.
 
-  /** A class to hold external / context-free name bindings.
-   *
-   * These names access external data and therefore have no context. An externally accessible
-   * singleton instance of this is used as the default if no explicit name set is provided. This
-   * enables the executable to establish a set of global names to be used.
-   */
-  class ExternalNames : public NameMap<ExternalGeneratorSignature>, public NameBinding
-  {
-    using self_type  = ExternalNames;                       ///< Self reference type.
-    using super_type = NameMap<ExternalGeneratorSignature>; ///< Super class.
-    using Map        = super_type::Map;                     ///< Inherit from superclass.
+  /// The bound accessor is this class.
+  NameBinding const& bind() const;
 
+  /// Bound name access.
+  BufferWriter& operator()(BufferWriter& w, const Spec& spec) const override;
+
+  /// @copydoc NameMap::assign(std::string_view const &name, Generator const &generator)
+};
+
+/** Associate names with context dependent generators.
+ *
+ * @tparam T The context type. This is used directly. If the context needs to be @c const
+ * then this parameter should make that explicit, e.g. @c ContextNames<const Context>. This
+ * parameter is accessible via the @c context_type alias.
+ *
+ * This provides a name binding that also has a local context, provided at the formatting call
+ * site. The functors have access to this context and are presumed to use it to generate output.
+ * This binding can also contain external generators which do not get access to the context to
+ * make it convenient to add external generators as well as context generators.
+ *
+ * A context functor should have the signature
+ * @code
+ *   BufferWriter & generator(BufferWriter & w, const Spec & spec, T & context);
+ * @endcode
+ *
+ * @a context will be the context for the binding passed to the formatter.
+ *
+ * This is used by the formatting logic by calling the @c bind method with a context object.
+ */
+template<typename T>
+class ContextNames : public NameMap<BufferWriter&(BufferWriter&, const Spec&, T&)> {
+private:
+  using self_type  = ContextNames; ///< self reference type.
+  using super_type = NameMap<BufferWriter&(BufferWriter&, const Spec&, T&)>;
+  using Map        = typename super_type::Map;
+
+public:
+  using context_type = T; ///< Export for external convenience.
+  /// Functional type for a generator.
+  using Generator = typename super_type::Generator;
+  /// Signature for an external (context-free) generator.
+  using ExternalGenerator = std::function<ExternalGeneratorSignature>;
+
+  using super_type::super_type; // inherit @c super_type constructors.
+
+  class Binding : public NameBinding {
   public:
-    using super_type::super_type; // import constructors.
+    /** Override of virtual method to provide an implementation.
+     *
+     * @param w Output.
+     * @param spec Format specifier for output.
+     * @return @a w
+     *
+     * This is called from the formatting logic to generate output for a named specifier. Subclasses
+     * that need to handle name dispatch differently need only override this method.
+     */
+    BufferWriter&
+    operator()(BufferWriter& w, const Spec& spec) const override {
+      return _names(w, spec, _ctx);
+    }
 
-    /// The bound accessor is this class.
-    NameBinding const &bind() const;
+  protected:
+    Binding(ContextNames const& names, context_type& ctx) : _ctx(ctx), _names(names) {}
 
-    /// Bound name access.
-    BufferWriter &operator()(BufferWriter &w, const Spec &spec) const override;
+    context_type& _ctx;         ///< Context for generators.
+    ContextNames const& _names; ///< Base set of names.
 
-    /// @copydoc NameMap::assign(std::string_view const &name, Generator const &generator)
+    friend ContextNames;
   };
 
-  /** Associate names with context dependent generators.
+  /** Assign the external generator @a bg to @a name.
    *
-   * @tparam T The context type. This is used directly. If the context needs to be @c const
-   * then this parameter should make that explicit, e.g. @c ContextNames<const Context>. This
-   * parameter is accessible via the @c context_type alias.
+   * This is used for generators in the namespace that do not use the context.
    *
-   * This provides a name binding that also has a local context, provided at the formatting call
-   * site. The functors have access to this context and are presumed to use it to generate output.
-   * This binding can also contain external generators which do not get access to the context to
-   * make it convenient to add external generators as well as context generators.
-   *
-   * A context functor should have the signature
-   * @code
-   *   BufferWriter & generator(BufferWriter & w, const Spec & spec, T & context);
-   * @endcode
+   * @param name Name associated with the generator.
+   * @param bg An external generator that requires no context.
+   * @return @c *this
+   */
+  self_type& assign(std::string_view const& name, const ExternalGenerator& bg);
+
+  /** Assign the @a generator to the @a name.
    *
-   * @a context will be the context for the binding passed to the formatter.
+   * @param name Name associated with the @a generator.
+   * @param generator The generator function.
    *
-   * This is used by the formatting logic by calling the @c bind method with a context object.
+   * @internal This is a covarying override of the super type, added to covary and
+   * provide documentation.
    */
-  template <typename T> class ContextNames : public NameMap<BufferWriter &(BufferWriter &, const Spec &, T &)>
-  {
-  private:
-    using self_type  = ContextNames; ///< self reference type.
-    using super_type = NameMap<BufferWriter &(BufferWriter &, const Spec &, T &)>;
-    using Map        = typename super_type::Map;
-
-  public:
-    using context_type = T; ///< Export for external convenience.
-    /// Functional type for a generator.
-    using Generator = typename super_type::Generator;
-    /// Signature for an external (context-free) generator.
-    using ExternalGenerator = std::function<ExternalGeneratorSignature>;
-
-    using super_type::super_type; // inherit @c super_type constructors.
-
-    class Binding : public NameBinding
-    {
-    public:
-      /** Override of virtual method to provide an implementation.
-       *
-       * @param w Output.
-       * @param spec Format specifier for output.
-       * @return @a w
-       *
-       * This is called from the formatting logic to generate output for a named specifier. Subclasses
-       * that need to handle name dispatch differently need only override this method.
-       */
-      BufferWriter &
-      operator()(BufferWriter &w, const Spec &spec) const override
-      {
-        return _names(w, spec, _ctx);
-      }
-
-    protected:
-      Binding(ContextNames const &names, context_type &ctx) : _ctx(ctx), _names(names) {}
+  self_type& assign(std::string_view const& name, Generator const& generator);
 
-      context_type &_ctx;         ///< Context for generators.
-      ContextNames const &_names; ///< Base set of names.
+  /** Bind the name map to a specific @a context.
+   *
+   * @param context The instance of @a T to use in the generators.
+   * @return A reference to an internal instance of a subclass of the protocol class @c BoundNames.
+   *
+   * This is used when passing the context name map to the formatter.
+   */
+  Binding bind(context_type& context);
 
-      friend ContextNames;
-    };
+protected:
+  /** Generate output based on the name in @a spec.
+   *
+   * @param w Output.
+   * @param spec Format specifier for output.
+   * @param ctx The context object.
+   * @return @a w
+   *
+   * This is called from the formatting logic to generate output for a named specifier. Subclasses
+   * that need to handle name dispatch differently should override this method. This method
+   * performs a name lookup in the local nameset.
+   */
+  virtual BufferWriter& operator()(BufferWriter& w, const Spec& spec, context_type& ctx) const;
+};
 
-    /** Assign the external generator @a bg to @a name.
-     *
-     * This is used for generators in the namespace that do not use the context.
-     *
-     * @param name Name associated with the generator.
-     * @param bg An external generator that requires no context.
-     * @return @c *this
-     */
-    self_type &assign(std::string_view const &name, const ExternalGenerator &bg);
+/** Default global names.
+ * This nameset is used if no other is provided. Therefore bindings added to this nameset will be
+ * available in the default formatting use.
+ */
+extern ExternalNames Global_Names;
 
-    /** Assign the @a generator to the @a name.
-     *
-     * @param name Name associated with the @a generator.
-     * @param generator The generator function.
-     *
-     * @internal This is a covarying override of the super type, added to covary and
-     * provide documentation.
-     */
-    self_type &assign(std::string_view const &name, Generator const &generator);
+// --------------- Implementation --------------------
+/// --- Spec ---
 
-    /** Bind the name map to a specific @a context.
-     *
-     * @param context The instance of @a T to use in the generators.
-     * @return A reference to an internal instance of a subclass of the protocol class @c BoundNames.
-     *
-     * This is used when passing the context name map to the formatter.
-     */
-    Binding bind(context_type &context);
+inline Spec::Align
+Spec::align_of(char c) {
+  return static_cast<Align>(_prop._data[static_cast<unsigned>(c)] & Property::ALIGN_MASK);
+}
 
-  protected:
-    /** Generate output based on the name in @a spec.
-     *
-     * @param w Output.
-     * @param spec Format specifier for output.
-     * @param ctx The context object.
-     * @return @a w
-     *
-     * This is called from the formatting logic to generate output for a named specifier. Subclasses
-     * that need to handle name dispatch differently should override this method. This method
-     * performs a name lookup in the local nameset.
-     */
-    virtual BufferWriter &operator()(BufferWriter &w, const Spec &spec, context_type &ctx) const;
-  };
+inline bool
+Spec::is_sign(char c) {
+  return _prop._data[static_cast<unsigned>(c)] & Property::SIGN_CHAR;
+}
 
-  /** Default global names.
-   * This nameset is used if no other is provided. Therefore bindings added to this nameset will be
-   * available in the default formatting use.
-   */
-  extern ExternalNames Global_Names;
+inline bool
+Spec::is_type(char c) {
+  return _prop._data[static_cast<unsigned>(c)] & Property::TYPE_CHAR;
+}
 
-  // --------------- Implementation --------------------
-  /// --- Spec ---
+inline bool
+Spec::is_upper_case_type(char c) {
+  return _prop._data[static_cast<unsigned>(c)] & Property::UPPER_TYPE_CHAR;
+}
 
-  inline Spec::Align
-  Spec::align_of(char c)
-  {
-    return static_cast<Align>(_prop._data[static_cast<unsigned>(c)] & Property::ALIGN_MASK);
-  }
+inline bool
+Spec::is_numeric_type(char c) {
+  return _prop._data[static_cast<unsigned>(c)] & Property::NUMERIC_TYPE_CHAR;
+}
 
-  inline bool
-  Spec::is_sign(char c)
-  {
-    return _prop._data[static_cast<unsigned>(c)] & Property::SIGN_CHAR;
-  }
+inline bool
+Spec::has_numeric_type() const {
+  return _prop._data[static_cast<unsigned>(_type)] & Property::NUMERIC_TYPE_CHAR;
+}
 
-  inline bool
-  Spec::is_type(char c)
-  {
-    return _prop._data[static_cast<unsigned>(c)] & Property::TYPE_CHAR;
-  }
+inline bool
+Spec::has_upper_case_type() const {
+  return _prop._data[static_cast<unsigned>(_type)] & Property::UPPER_TYPE_CHAR;
+}
 
-  inline bool
-  Spec::is_upper_case_type(char c)
-  {
-    return _prop._data[static_cast<unsigned>(c)] & Property::UPPER_TYPE_CHAR;
-  }
+inline bool
+Spec::has_pointer_type() const {
+  return _type == 'p' || _type == 'P';
+}
 
-  inline bool
-  Spec::is_numeric_type(char c)
-  {
-    return _prop._data[static_cast<unsigned>(c)] & Property::NUMERIC_TYPE_CHAR;
-  }
+inline bool
+Spec::has_valid_type() const {
+  return _type != INVALID_TYPE;
+}
 
-  inline bool
-  Spec::has_numeric_type() const
-  {
-    return _prop._data[static_cast<unsigned>(_type)] & Property::NUMERIC_TYPE_CHAR;
-  }
+inline auto
+Format::bind(swoc::TextView fmt) -> TextViewExtractor {
+  return {fmt};
+}
 
-  inline bool
-  Spec::has_upper_case_type() const
-  {
-    return _prop._data[static_cast<unsigned>(_type)] & Property::UPPER_TYPE_CHAR;
-  }
+inline auto
+Format::bind() const -> FormatExtractor {
+  return {_items};
+}
 
-  inline bool
-  Spec::has_pointer_type() const
-  {
-    return _type == 'p' || _type == 'P';
-  }
+inline Format::TextViewExtractor::operator bool() const { return !_fmt.empty(); }
 
-  inline bool
-  Spec::has_valid_type() const
-  {
-    return _type != INVALID_TYPE;
-  }
+inline Format::FormatExtractor::operator bool() const {
+  return _idx < static_cast<int>(_fmt.size());
+}
 
-  inline auto
-  Format::bind(swoc::TextView fmt) -> TextViewExtractor
-  {
-    return {fmt};
-  }
+/// --- Names / Generators ---
 
-  inline auto
-  Format::bind() const -> FormatExtractor
-  {
-    return {_items};
-  }
+inline BufferWriter&
+NameBinding::err_invalid_name(BufferWriter& w, const Spec& spec) {
+  return w.print("{{~{}~}}", spec._name);
+}
 
-  inline Format::TextViewExtractor::operator bool() const { return !_fmt.empty(); }
-  inline Format::FormatExtractor::operator bool() const { return _idx < static_cast<int>(_fmt.size()); }
+inline BufferWriter&
+NilBinding::operator()(BufferWriter&, bwf::Spec const&) const {
+  throw std::runtime_error("Use of nil bound names in BW formatting");
+}
 
-  /// --- Names / Generators ---
+template<typename T>
+inline auto
+ContextNames<T>::bind(context_type& ctx) -> Binding {
+  return {*this, ctx};
+}
 
-  inline BufferWriter &
-  NameBinding::err_invalid_name(BufferWriter &w, const Spec &spec)
-  {
-    return w.print("{{~{}~}}", spec._name);
+template<typename T>
+BufferWriter&
+ContextNames<T>::operator()(BufferWriter& w, const Spec& spec, context_type& ctx) const {
+  if (!spec._name.empty()) {
+    if (auto spot = super_type::_map.find(spec._name); spot != super_type::_map.end()) {
+      spot->second(w, spec, ctx);
+    } else {
+      NameBinding::err_invalid_name(w, spec);
+    }
   }
+  return w;
+}
 
-  inline BufferWriter &
-  NilBinding::operator()(BufferWriter &, bwf::Spec const &) const
-  {
-    throw std::runtime_error("Use of nil bound names in BW formatting");
-  }
+template<typename F> NameMap<F>::NameMap() {}
 
-  template <typename T>
-  inline auto
-  ContextNames<T>::bind(context_type &ctx) -> Binding
-  {
-    return {*this, ctx};
+template<typename F>
+NameMap<F>::NameMap(std::initializer_list<std::tuple<std::string_view, const Generator&>> list) {
+  for (auto &&[name, generator] : list) {
+    this->assign(name, generator);
   }
+}
 
-  template <typename T>
-  BufferWriter &
-  ContextNames<T>::operator()(BufferWriter &w, const Spec &spec, context_type &ctx) const
-  {
-    if (!spec._name.empty()) {
-      if (auto spot = super_type::_map.find(spec._name); spot != super_type::_map.end()) {
-        spot->second(w, spec, ctx);
-      } else {
-        NameBinding::err_invalid_name(w, spec);
-      }
-    }
-    return w;
-  }
+template<typename F>
+std::string_view
+NameMap<F>::localize(std::string_view const& name) {
+  auto span = _arena.alloc(name.size());
+  memcpy(span, name);
+  return span.view();
+}
 
-  template <typename F> NameMap<F>::NameMap() {}
+template<typename F>
+auto
+NameMap<F>::assign(std::string_view const& name, Generator const& generator) -> self_type& {
+  _map[this->localize(name)] = generator;
+  return *this;
+}
 
-  template <typename F> NameMap<F>::NameMap(std::initializer_list<std::tuple<std::string_view, const Generator &>> list)
-  {
-    for (auto &&[name, generator] : list) {
-      this->assign(name, generator);
+inline BufferWriter&
+ExternalNames::operator()(BufferWriter& w, const Spec& spec) const {
+  if (!spec._name.empty()) {
+    if (auto spot = _map.find(spec._name); spot != _map.end()) {
+      spot->second(w, spec);
+    } else {
+      this->err_invalid_name(w, spec);
     }
   }
+  return w;
+}
 
-  template <typename F>
-  std::string_view
-  NameMap<F>::localize(std::string_view const &name)
-  {
-    auto span = _arena.alloc(name.size());
-    memcpy(span, name);
-    return span.view();
-  }
+inline NameBinding const&
+ExternalNames::bind() const {
+  return *this;
+}
 
-  template <typename F>
-  auto
-  NameMap<F>::assign(std::string_view const &name, Generator const &generator) -> self_type &
-  {
-    _map[this->localize(name)] = generator;
-    return *this;
-  }
+template<typename T>
+auto
+ContextNames<T>::assign(std::string_view const& name, ExternalGenerator const& bg) -> self_type& {
+  // wrap @a bg in a shim that discards the context so it can be stored in the map.
+  super_type::assign(name, [bg](BufferWriter& w, Spec const& spec
+                                , context_type&) -> BufferWriter& { return bg(w, spec); });
+  return *this;
+}
 
-  inline BufferWriter &
-  ExternalNames::operator()(BufferWriter &w, const Spec &spec) const
-  {
-    if (!spec._name.empty()) {
-      if (auto spot = _map.find(spec._name); spot != _map.end()) {
-        spot->second(w, spec);
-      } else {
-        this->err_invalid_name(w, spec);
-      }
-    }
-    return w;
-  }
+template<typename T>
+auto
+ContextNames<T>::assign(std::string_view const& name, Generator const& g) -> self_type& {
+  super_type::assign(name, g);
+  return *this;
+}
 
-  inline NameBinding const &
-  ExternalNames::bind() const
-  {
-    return *this;
-  }
+/// --- Formatting ---
 
-  template <typename T>
-  auto
-  ContextNames<T>::assign(std::string_view const &name, ExternalGenerator const &bg) -> self_type &
-  {
-    // wrap @a bg in a shim that discards the context so it can be stored in the map.
-    super_type::assign(name, [bg](BufferWriter &w, Spec const &spec, context_type &) -> BufferWriter & { return bg(w, spec); });
-    return *this;
-  }
+/// Internal signature for template generated formatting.
+/// @a args is a forwarded tuple of arguments to be processed.
+template<typename TUPLE> using ArgFormatterSignature = BufferWriter& (*)(BufferWriter& w
+                                                                         , Spec const&
+                                                                         , TUPLE const& args);
 
-  template <typename T>
-  auto
-  ContextNames<T>::assign(std::string_view const &name, Generator const &g) -> self_type &
-  {
-    super_type::assign(name, g);
-    return *this;
-  }
+/// Internal error / reporting message generators
+void Err_Bad_Arg_Index(BufferWriter& w, int i, size_t n);
 
-  /// --- Formatting ---
+// MSVC will expand the parameter pack inside a lambda but not gcc, so this indirection is required.
 
-  /// Internal signature for template generated formatting.
-  /// @a args is a forwarded tuple of arguments to be processed.
-  template <typename TUPLE> using ArgFormatterSignature = BufferWriter &(*)(BufferWriter &w, Spec const &, TUPLE const &args);
+/// This selects the @a I th argument in the @a TUPLE arg pack and calls the formatter on it. This
+/// (or the equivalent lambda) is needed because the array of formatters must have a homogenous
+/// signature, not vary per argument. Effectively this indirection erases the type of the specific
+/// argument being formatted. Instances of this have the signature @c ArgFormatterSignature.
+template<typename TUPLE, size_t I>
+BufferWriter&
+Arg_Formatter(BufferWriter& w, Spec const& spec, TUPLE const& args) {
+  return bwformat(w, spec, std::get<I>(args));
+}
 
-  /// Internal error / reporting message generators
-  void Err_Bad_Arg_Index(BufferWriter &w, int i, size_t n);
+/// This exists only to expand the index sequence into an array of formatters for the tuple type
+/// @a TUPLE.  Due to langauge limitations it cannot be done directly. The formatters can be
+/// accessed via standard array access in contrast to templated tuple access. The actual array is
+/// static and therefore at run time the only operation is loading the address of the array.
+template<typename TUPLE, size_t... N>
+ArgFormatterSignature<TUPLE> *
+Get_Arg_Formatter_Array(std::index_sequence<N...>) {
+  static ArgFormatterSignature<TUPLE> fa[sizeof...(N)] = {&bwf::Arg_Formatter<TUPLE, N>...};
+  return fa;
+}
 
-  // MSVC will expand the parameter pack inside a lambda but not gcc, so this indirection is required.
+/// Perform alignment adjustments / fill on @a w of the content in @a lw.
+/// This is the normal mechanism, in cases where the length can be known or limited before
+/// conversion, it can be more efficient to work in a temporary local buffer and copy out
+/// as needed without moving data in the output buffer.
+void Adjust_Alignment(BufferWriter& aux, Spec const& spec);
 
-  /// This selects the @a I th argument in the @a TUPLE arg pack and calls the formatter on it. This
-  /// (or the equivalent lambda) is needed because the array of formatters must have a homogenous
-  /// signature, not vary per argument. Effectively this indirection erases the type of the specific
-  /// argument being formatted. Instances of this have the signature @c ArgFormatterSignature.
-  template <typename TUPLE, size_t I>
-  BufferWriter &
-  Arg_Formatter(BufferWriter &w, Spec const &spec, TUPLE const &args)
-  {
-    return bwformat(w, spec, std::get<I>(args));
-  }
+/** Format @a n as an integral value.
+ *
+ * @param w Output buffer.
+ * @param spec Format specifier.
+ * @param n Input value to format.
+ * @param negative_p Input value should be treated as a negative value.
+ * @return @a w
+ *
+ * A leading sign character will be output based on @a spec and @a negative_p.
+ */
+BufferWriter& Format_Integer(BufferWriter& w, Spec const& spec, uintmax_t n, bool negative_p);
 
-  /// This exists only to expand the index sequence into an array of formatters for the tuple type
-  /// @a TUPLE.  Due to langauge limitations it cannot be done directly. The formatters can be
-  /// accessed via standard array access in contrast to templated tuple access. The actual array is
-  /// static and therefore at run time the only operation is loading the address of the array.
-  template <typename TUPLE, size_t... N>
-  ArgFormatterSignature<TUPLE> *
-  Get_Arg_Formatter_Array(std::index_sequence<N...>)
-  {
-    static ArgFormatterSignature<TUPLE> fa[sizeof...(N)] = {&bwf::Arg_Formatter<TUPLE, N>...};
-    return fa;
-  }
+/** Format @a f as a floating point value.
+ *
+ * @param w Output buffer.
+ * @param spec Format specifier.
+ * @param f Input value to format.
+ * @param negative_p Input value shoudl be treated as a negative value.
+ * @return @a w
+ *
+ * A leading sign character will be output based on @a spec and @a negative_p.
+ */
+BufferWriter& Format_Float(BufferWriter& w, Spec const& spec, double f, bool negative_p);
 
-  /// Perform alignment adjustments / fill on @a w of the content in @a lw.
-  /// This is the normal mechanism, in cases where the length can be known or limited before
-  /// conversion, it can be more efficient to work in a temporary local buffer and copy out
-  /// as needed without moving data in the output buffer.
-  void Adjust_Alignment(BufferWriter &aux, Spec const &spec);
+/** Format output as a hexadecimal dump.
+ *
+ * @param w Output buffer.
+ * @param view Input view.
+ * @param digits Digit array for hexadecimal digits.
+ *
+ * This dumps the memory in the @a view as a hexadecimal string.
+ */
+void Format_As_Hex(BufferWriter& w, std::string_view view, const char *digits);
 
-  /** Format @a n as an integral value.
-   *
-   * @param w Output buffer.
-   * @param spec Format specifier.
-   * @param n Input value to format.
-   * @param negative_p Input value should be treated as a negative value.
-   * @return @a w
-   *
-   * A leading sign character will be output based on @a spec and @a negative_p.
-   */
-  BufferWriter &Format_Integer(BufferWriter &w, Spec const &spec, uintmax_t n, bool negative_p);
+/* Capture support, which allows format extractors to capture arguments and consume them.
+ * This was built in order to support C style formatting, which needs to capture arguments
+ * to set the minimum width and/or the precision of other arguments.
+ *
+ * The key component is the ability to dynamically access an element of a tuple using
+ * @c std::any.
+ *
+ * Note: Much of this was originally in the meta support but it caused problems in use if
+ * the tuple header wasn't also included. I was unable to determine why, so this code doesn't
+ * depend on tuple explicitly.
+ */
+/// The signature for accessing an element of a tuple.
+template<typename T> using TupleAccessorSignature = std::any (*)(T const& t);
+
+/// Template access method.
+template<size_t IDX, typename T>
+std::any
+TupleAccessor(T const& t) {
+  return std::any(&std::get<IDX>(t));
+}
 
-  /** Format @a f as a floating point value.
-   *
-   * @param w Output buffer.
-   * @param spec Format specifier.
-   * @param f Input value to format.
-   * @param negative_p Input value shoudl be treated as a negative value.
-   * @return @a w
-   *
-   * A leading sign character will be output based on @a spec and @a negative_p.
-   */
-  BufferWriter &Format_Float(BufferWriter &w, Spec const &spec, double f, bool negative_p);
+/// Create and return an array of specialized accessors, indexed by tuple index.
+template<typename T, size_t... N>
+std::array<TupleAccessorSignature<T>, sizeof...(N)>&
+Tuple_Accessor_Array(std::index_sequence<N...>) {
+  static std::array<TupleAccessorSignature<T>, sizeof...(N)> accessors = {&TupleAccessor<N>...};
+  return accessors;
+}
 
-  /** Format output as a hexadecimal dump.
-   *
-   * @param w Output buffer.
-   * @param view Input view.
-   * @param digits Digit array for hexadecimal digits.
-   *
-   * This dumps the memory in the @a view as a hexadecimal string.
-   */
-  void Format_As_Hex(BufferWriter &w, std::string_view view, const char *digits);
+/// Get the Nth element of the tuple as @c std::any.
+template<typename T>
+std::any
+Tuple_Nth(T const& t, size_t idx) {
+  return Tuple_Accessor_Array<T>(std::make_index_sequence<std::tuple_size<T>::value>())[idx](t);
+}
 
-  /* Capture support, which allows format extractors to capture arguments and consume them.
-   * This was built in order to support C style formatting, which needs to capture arguments
-   * to set the minimum width and/or the precision of other arguments.
-   *
-   * The key component is the ability to dynamically access an element of a tuple using
-   * @c std::any.
-   *
-   * Note: Much of this was originally in the meta support but it caused problems in use if
-   * the tuple header wasn't also included. I was unable to determine why, so this code doesn't
-   * depend on tuple explicitly.
-   */
-  /// The signature for accessing an element of a tuple.
-  template <typename T> using TupleAccessorSignature = std::any (*)(T const &t);
-  /// Template access method.
-  template <size_t IDX, typename T>
-  std::any
-  TupleAccessor(T const &t)
-  {
-    return std::any(&std::get<IDX>(t));
-  }
+/// If capture is used, the format extractor must provide a @c capture method. This isn't required
+/// so make it compile time optional, but throw if the extractor sets up for capture and didn't
+/// provide one.
+template<typename F>
+auto
+arg_capture(F&& f, BufferWriter&, Spec const&, std::any&&, swoc::meta::CaseTag<0>) -> void {
+  throw std::runtime_error("Capture specification used in format extractor that does not support capture");
+}
 
-  /// Create and return an array of specialized accessors, indexed by tuple index.
-  template <typename T, size_t... N>
-  std::array<TupleAccessorSignature<T>, sizeof...(N)> &
-  Tuple_Accessor_Array(std::index_sequence<N...>)
-  {
-    static std::array<TupleAccessorSignature<T>, sizeof...(N)> accessors = {&TupleAccessor<N>...};
-    return accessors;
-  }
+template<typename F>
+auto
+arg_capture(F&& f, BufferWriter& w, Spec const& spec, std::any&& value, swoc::meta::CaseTag<1>)
+-> decltype(f.capture(w, spec, value)) {
+  return f.capture(w, spec, value);
+}
 
-  /// Get the Nth element of the tuple as @c std::any.
-  template <typename T>
-  std::any
-  Tuple_Nth(T const &t, size_t idx)
-  {
-    return Tuple_Accessor_Array<T>(std::make_index_sequence<std::tuple_size<T>::value>())[idx](t);
-  }
+/** Extract the specifier type from an Extractor.
+ *
+ * @tparam EXTRACTOR Format extractor functor type.
+ * @tparam VIEW String view argument type.
+ * @tparam SPEC Specifier argument type.
+ * @param m The extractor method.
+ * @return A value of type @a SPEC
+ *
+ * This is never called - it exists to extract @a SPEC from a format extractor functor to be used
+ * to declare the specifier instance passed to the format extractor. When used in this fashion
+ * with @c decltype the extracted type is a reference and that must be removed for the actual
+ * declaration type. The purpose is to enable format extractors to subclass @c bwf::Spec to
+ * pass additional information along, particularly to a name binding without interfering with
+ * the base use case.
+ */
+template<typename EXTRACTOR, typename VIEW, typename SPEC>
+auto
+extractor_spec_type(bool (EXTRACTOR::*m)(VIEW, SPEC)) -> SPEC {
+}
 
-  /// If capture is used, the format extractor must provide a @c capture method. This isn't required
-  /// so make it compile time optional, but throw if the extractor sets up for capture and didn't
-  /// provide one.
-  template <typename F>
-  auto
-  arg_capture(F &&f, BufferWriter &, Spec const &, std::any &&, swoc::meta::CaseTag<0>) -> void
-  {
-    throw std::runtime_error("Capture specification used in format extractor that does not support capture");
-  }
-  template <typename F>
-  auto
-  arg_capture(F &&f, BufferWriter &w, Spec const &spec, std::any &&value, swoc::meta::CaseTag<1>)
-    -> decltype(f.capture(w, spec, value))
-  {
-    return f.capture(w, spec, value);
-  }
+/** A pack of arguments for formatting.
+ *
+ * @internal After much consideration, I decided this was the correct choice, to enable type
+ * erasure of the arguments to the base formatting logic. This costs a virtual function dispatch
+ * but prevents the formatting logic from being dpulicated for every permutation of arguments.
+ * Overall, for any reasonably sized project, I think this is the better option.
+ *
+ * This also supports passing arguments in other than a tuple, which is necessary in order to
+ * pass arguments in various containers such as a vector.
+ */
+class ArgPack {
+public:
+  virtual ~ArgPack() = default; /// Force virtual destructor for subclasses.
 
-  /** Extract the specifier type from an Extractor.
+  /** Get argument at index @a idx.
    *
-   * @tparam EXTRACTOR Format extractor functor type.
-   * @tparam VIEW String view argument type.
-   * @tparam SPEC Specifier argument type.
-   * @param m The extractor method.
-   * @return A value of type @a SPEC
+   * @param idx Argument index.
+   * @return The argument value.
    *
-   * This is never called - it exists to extract @a SPEC from a format extractor functor to be used
-   * to declare the specifier instance passed to the format extractor. When used in this fashion
-   * with @c decltype the extracted type is a reference and that must be removed for the actual
-   * declaration type. The purpose is to enable format extractors to subclass @c bwf::Spec to
-   * pass additional information along, particularly to a name binding without interfering with
-   * the base use case.
+   * In general the arguments will be stored by reference and so the returned @c std::any
+   * instance will be a reference type.
    */
-  template <typename EXTRACTOR, typename VIEW, typename SPEC>
-  auto
-  extractor_spec_type(bool (EXTRACTOR::*m)(VIEW, SPEC)) -> SPEC
-  {
-  }
+  virtual std::any capture(unsigned idx) const = 0;
 
-  /** A pack of arguments for formatting.
-   *
-   * @internal After much consideration, I decided this was the correct choice, to enable type
-   * erasure of the arguments to the base formatting logic. This costs a virtual function dispatch
-   * but prevents the formatting logic from being dpulicated for every permutation of arguments.
-   * Overall, for any reasonably sized project, I think this is the better option.
+  /** Generate formatted output for an argument.
    *
-   * This also supports passing arguments in other than a tuple, which is necessary in order to
-   * pass arguments in various containers such as a vector.
+   * @param idx Argument index.
+   * @param w Output.
+   * @param spec Formatting specifier.
+   * @return @a w
    */
-  class ArgPack
-  {
-  public:
-    virtual ~ArgPack() = default; /// Force virtual destructor for subclasses.
-
-    /** Get argument at index @a idx.
-     *
-     * @param idx Argument index.
-     * @return The argument value.
-     *
-     * In general the arguments will be stored by reference and so the returned @c std::any
-     * instance will be a reference type.
-     */
-    virtual std::any capture(unsigned idx) const = 0;
+  virtual BufferWriter& print(unsigned idx, BufferWriter& w, Spec const& spec) const = 0;
 
-    /** Generate formatted output for an argument.
-     *
-     * @param idx Argument index.
-     * @param w Output.
-     * @param spec Formatting specifier.
-     * @return @a w
-     */
-    virtual BufferWriter &print(unsigned idx, BufferWriter &w, Spec const &spec) const = 0;
+  /// Number of arguments in the pack.
+  virtual unsigned count() const = 0;
+};
 
-    /// Number of arguments in the pack.
-    virtual unsigned count() const = 0;
-  };
+/** An argument pack based on a reference tuple.
+ *
+ * @tparam Args Type of arguments in the tuple.
+ *
+ * This contains a reference to the tuple, and so is only suitable for passing as a temporary.
+ *
+ */
+template<typename... Args> class ArgTuple : public ArgPack {
+public:
+  /// Construct from a tuple.
+  ArgTuple(std::tuple<Args...> const& tuple) : _tuple(tuple) {}
 
-  /** An argument pack based on a reference tuple.
-   *
-   * @tparam Args Type of arguments in the tuple.
-   *
-   * This contains a reference to the tuple, and so is only suitable for passing as a temporary.
-   *
-   */
-  template <typename... Args> class ArgTuple : public ArgPack
-  {
-  public:
-    /// Construct from a tuple.
-    ArgTuple(std::tuple<Args...> const &tuple) : _tuple(tuple) {}
+protected:
+  unsigned count() const override;
 
-  protected:
-    unsigned count() const override;
+  BufferWriter& print(unsigned idx, BufferWriter& w, Spec const& spec) const override;
 
-    BufferWriter &print(unsigned idx, BufferWriter &w, Spec const &spec) const override;
+  std::any capture(unsigned idx) const override;
 
-    std::any capture(unsigned idx) const override;
-
-    std::tuple<Args...> const &_tuple;
-  };
+  std::tuple<Args...> const& _tuple;
+};
 
-  template <typename... Args>
-  unsigned
-  ArgTuple<Args...>::count() const
-  {
-    return sizeof...(Args);
-  }
+template<typename... Args>
+unsigned
+ArgTuple<Args...>::count() const {
+  return sizeof...(Args);
+}
 
-  template <typename... Args>
-  BufferWriter &
-  ArgTuple<Args...>::print(unsigned idx, BufferWriter &w, Spec const &spec) const
-  {
-    static const auto _fa{bwf::Get_Arg_Formatter_Array<std::tuple<Args...>>(std::index_sequence_for<Args...>{})};
-    return _fa[idx](w, spec, _tuple);
-  }
+template<typename... Args>
+BufferWriter&
+ArgTuple<Args...>::print(unsigned idx, BufferWriter& w, Spec const& spec) const {
+  static const auto _fa{
+      bwf::Get_Arg_Formatter_Array<std::tuple<Args...>>(std::index_sequence_for<Args...>{})};
+  return _fa[idx](w, spec, _tuple);
+}
 
-  template <typename... Args>
-  std::any
-  ArgTuple<Args...>::capture(unsigned idx) const
-  {
-    return {Tuple_Nth(_tuple, idx)};
-  }
+template<typename... Args>
+std::any
+ArgTuple<Args...>::capture(unsigned idx) const {
+  return {Tuple_Nth(_tuple, idx)};
+}
 
 }; // namespace bwf
 
-template <typename Binding, typename Extractor>
-BufferWriter &
-BufferWriter::print_nfv(Binding &&names, Extractor &&ex, bwf::ArgPack const &args)
-{
+template<typename Binding, typename Extractor>
+BufferWriter&
+BufferWriter::print_nfv(Binding&& names, Extractor&& ex, bwf::ArgPack const& args) {
   using namespace std::literals;
   // This gets the actual specifier type from the Extractor - it must be a subclass of @c bwf::Spec
   // but this enables format extractors to use a subclass if additional data needs to be passed
   // via the specifier.
   using spec_type =
-    typename std::remove_reference<decltype(bwf::extractor_spec_type(&std::remove_reference<Extractor>::type::operator()))>::type;
-  int N    = args.count();
+  typename std::remove_reference<decltype(bwf::extractor_spec_type(&std::remove_reference<Extractor>::type::operator()))>::type;
+  int N = args.count();
   int arg_idx = 0; // the next argument index to be processed.
 
   // Parser is required to return @c false if there's no more data, @c true if something was parsed.
@@ -889,71 +857,65 @@ BufferWriter::print_nfv(Binding &&names, Extractor &&ex, bwf::ArgPack const &arg
   return *this;
 }
 
-template <typename... Args>
-BufferWriter &
-BufferWriter::print(const TextView &fmt, Args &&... args)
-{
-  return this->print_nfv(bwf::Global_Names.bind(), bwf::Format::bind(fmt), bwf::ArgTuple{std::forward_as_tuple(args...)});
+template<typename... Args>
+BufferWriter&
+BufferWriter::print(const TextView& fmt, Args&& ... args) {
+  return this->print_nfv(bwf::Global_Names.bind(), bwf::Format::bind(fmt), bwf::ArgTuple{
+      std::forward_as_tuple(args...)});
 }
 
-template <typename... Args>
-BufferWriter &
-BufferWriter::print(bwf::Format const &fmt, Args &&... args)
-{
-  return this->print_nfv(bwf::Global_Names.bind(), fmt.bind(), bwf::ArgTuple{std::forward_as_tuple(args...)});
+template<typename... Args>
+BufferWriter&
+BufferWriter::print(bwf::Format const& fmt, Args&& ... args) {
+  return this->print_nfv(bwf::Global_Names.bind(), fmt.bind(), bwf::ArgTuple{
+      std::forward_as_tuple(args...)});
 }
 
-template <typename... Args>
-BufferWriter &
-BufferWriter::print_v(TextView const &fmt, std::tuple<Args...> const &args)
-{
+template<typename... Args>
+BufferWriter&
+BufferWriter::print_v(TextView const& fmt, std::tuple<Args...> const& args) {
   return this->print_nfv(bwf::Global_Names.bind(), bwf::Format::bind(fmt), bwf::ArgTuple{args});
 }
 
-template <typename... Args>
-BufferWriter &
-BufferWriter::print_v(const bwf::Format &fmt, const std::tuple<Args...> &args)
-{
+template<typename... Args>
+BufferWriter&
+BufferWriter::print_v(const bwf::Format& fmt, const std::tuple<Args...>& args) {
   return this->print_nfv(bwf::Global_Names.bind(), fmt.bind(), bwf::ArgTuple{args});
 }
 
-template <typename Binding, typename Extractor>
-BufferWriter &
-BufferWriter::print_nfv(Binding const &names, Extractor &&f)
-{
+template<typename Binding, typename Extractor>
+BufferWriter&
+BufferWriter::print_nfv(Binding const& names, Extractor&& f) {
   return print_nfv(names, f, bwf::ArgTuple{std::make_tuple()});
 }
 
-template <typename Binding>
-BufferWriter &
-BufferWriter::print_n(Binding const &names, TextView const &fmt)
-{
+template<typename Binding>
+BufferWriter&
+BufferWriter::print_n(Binding const& names, TextView const& fmt) {
   return print_nfv(names, bwf::Format::bind(fmt), bwf::ArgTuple{std::make_tuple()});
 }
 
 inline MemSpan<char>
-BufferWriter::aux_span()
-{
+BufferWriter::aux_span() {
   return {this->aux_data(), this->remaining()};
 }
 
 // ---- Formatting for specific types.
 
 // Must be first because it is used by other formatters, and is not inline.
-BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, std::string_view sv);
+BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, std::string_view sv);
 
 // Pointers that are not specialized.
-inline BufferWriter &
-bwformat(BufferWriter &w, bwf::Spec const &spec, const void *ptr)
-{
-  using namespace SWOC_NAMESPACE::literals;
+inline BufferWriter&
+bwformat(BufferWriter& w, bwf::Spec const& spec, const void *ptr) {
+  using namespace swoc::literals;
   bwf::Spec ptr_spec{spec};
   ptr_spec._radix_lead_p = true;
 
   if (ptr == nullptr) {
     if (spec._type == 's' || spec._type == 'S') {
       ptr_spec._type = bwf::Spec::DEFAULT_TYPE;
-      ptr_spec._ext  = ""_sv; // clear any extension.
+      ptr_spec._ext = ""_sv; // clear any extension.
       return bwformat(w, spec, spec._type == 's' ? "null"_sv : "NULL"_sv);
     } else if (spec._type == bwf::Spec::DEFAULT_TYPE) {
       return w; // print nothing if there is no format character override.
@@ -968,12 +930,11 @@ bwformat(BufferWriter &w, bwf::Spec const &spec, const void *ptr)
   return bwf::Format_Integer(w, ptr_spec, reinterpret_cast<intptr_t>(ptr), false);
 }
 
-BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, MemSpan<void> const &span);
+BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, MemSpan<void> const& span);
 
-template <typename T>
-BufferWriter &
-bwformat(BufferWriter &w, bwf::Spec const &spec, MemSpan<T> const &span)
-{
+template<typename T>
+BufferWriter&
+bwformat(BufferWriter& w, bwf::Spec const& spec, MemSpan<T> const& span) {
   bwf::Spec s{spec};
   // If the precision isn't already specified, make it the size of the objects in the span.
   // This will break the output into blocks of that size.
@@ -983,23 +944,20 @@ bwformat(BufferWriter &w, bwf::Spec const &spec, MemSpan<T> const &span)
   return bwformat(w, s, span.template rebind<void>());
 };
 
-template <size_t N>
-BufferWriter &
-bwformat(BufferWriter &w, bwf::Spec const &spec, const char (&a)[N])
-{
+template<size_t N>
+BufferWriter&
+bwformat(BufferWriter& w, bwf::Spec const& spec, const char (& a)[N]) {
   return bwformat(w, spec, std::string_view(a, N - 1));
 }
 
 // Capture this explicitly so it doesn't go to any other pointer type.
-inline BufferWriter &
-bwformat(BufferWriter &w, bwf::Spec const &spec, std::nullptr_t)
-{
+inline BufferWriter&
+bwformat(BufferWriter& w, bwf::Spec const& spec, std::nullptr_t) {
   return bwformat(w, spec, static_cast<void *>(nullptr));
 }
 
-inline BufferWriter &
-bwformat(BufferWriter &w, bwf::Spec const &spec, const char *v)
-{
+inline BufferWriter&
+bwformat(BufferWriter& w, bwf::Spec const& spec, const char *v) {
   if (spec._type == 'x' || spec._type == 'X' || spec._type == 'p' || spec._type == 'P') {
     bwformat(w, spec, static_cast<const void *>(v));
   } else if (v != nullptr) {
@@ -1010,32 +968,28 @@ bwformat(BufferWriter &w, bwf::Spec const &spec, const char *v)
   return w;
 }
 
-inline BufferWriter &
-bwformat(BufferWriter &w, bwf::Spec const &spec, std::string const &s)
-{
+inline BufferWriter&
+bwformat(BufferWriter& w, bwf::Spec const& spec, std::string const& s) {
   return bwformat(w, spec, std::string_view{s});
 }
 
-inline BufferWriter &
-bwformat(BufferWriter &w, bwf::Spec const &spec, TextView tv)
-{
+inline BufferWriter&
+bwformat(BufferWriter& w, bwf::Spec const& spec, TextView tv) {
   return bwformat(w, spec, static_cast<std::string_view>(tv));
 }
 
-template <typename X, typename V>
-BufferWriter &
-bwformat(BufferWriter &w, bwf::Spec const &spec, TransformView<X, V> &&view)
-{
+template<typename X, typename V>
+BufferWriter&
+bwformat(BufferWriter& w, bwf::Spec const& spec, TransformView<X, V>&& view) {
   while (view)
     w.write(char(*(view++)));
   return w;
 }
 
-template <typename F>
+template<typename F>
 auto
-bwformat(BufferWriter &w, bwf::Spec const &spec, F &&f) ->
-  typename std::enable_if<std::is_floating_point<typename std::remove_reference<F>::type>::value, BufferWriter &>::type
-{
+bwformat(BufferWriter& w, bwf::Spec const& spec, F&& f) ->
+typename std::enable_if<std::is_floating_point<typename std::remove_reference<F>::type>::value, BufferWriter&>::type {
   return f < 0 ? bwf::Format_Float(w, spec, -f, true) : bwf::Format_Float(w, spec, f, false);
 }
 
@@ -1051,41 +1005,35 @@ bwformat(BufferWriter &w, bwf::Spec const &spec, F &&f) ->
    of integer types, rather tuning and hoping to get just the right set of overloads.
  */
 
-template <typename I>
+template<typename I>
 auto
-bwformat(BufferWriter &w, bwf::Spec const &spec, I &&i) ->
-  typename std::enable_if<std::is_unsigned<typename std::remove_reference<I>::type>::value &&
-                            std::is_integral<typename std::remove_reference<I>::type>::value,
-                          BufferWriter &>::type
-{
+bwformat(BufferWriter& w, bwf::Spec const& spec, I&& i) ->
+typename std::enable_if<std::is_unsigned<typename std::remove_reference<I>::type>::value &&
+                        std::is_integral<typename std::remove_reference<I>::type>::value, BufferWriter&>::type {
   return bwf::Format_Integer(w, spec, i, false);
 }
 
-template <typename I>
+template<typename I>
 auto
-bwformat(BufferWriter &w, bwf::Spec const &spec, I &&i) ->
-  typename std::enable_if<std::is_signed<typename std::remove_reference<I>::type>::value &&
-                            std::is_integral<typename std::remove_reference<I>::type>::value,
-                          BufferWriter &>::type
-{
-  bool neg_p  = false;
+bwformat(BufferWriter& w, bwf::Spec const& spec, I&& i) ->
+typename std::enable_if<std::is_signed<typename std::remove_reference<I>::type>::value &&
+                        std::is_integral<typename std::remove_reference<I>::type>::value, BufferWriter&>::type {
+  bool neg_p = false;
   uintmax_t n = static_cast<uintmax_t>(i);
   if (i < 0) {
-    n     = static_cast<uintmax_t>(-i);
+    n = static_cast<uintmax_t>(-i);
     neg_p = true;
   }
   return bwf::Format_Integer(w, spec, n, neg_p);
 }
 
-inline BufferWriter &
-bwformat(BufferWriter &w, bwf::Spec const &, char c)
-{
+inline BufferWriter&
+bwformat(BufferWriter& w, bwf::Spec const&, char c) {
   return w.write(c);
 }
 
-inline BufferWriter &
-bwformat(BufferWriter &w, bwf::Spec const &spec, bool f)
-{
+inline BufferWriter&
+bwformat(BufferWriter& w, bwf::Spec const& spec, bool f) {
   using namespace std::literals;
   if ('s' == spec._type) {
     w.write(f ? "true"sv : "false"sv);
@@ -1114,10 +1062,9 @@ bwformat(BufferWriter &w, bwf::Spec const &spec, bool f)
  * need to generate formatted output. For direct use there is an overload that takes an argument
  * list.
  */
-template <typename... Args>
-std::string &
-bwprint_v(std::string &s, TextView fmt, std::tuple<Args...> const &args)
-{
+template<typename... Args>
+std::string&
+bwprint_v(std::string& s, TextView fmt, std::tuple<Args...> const& args) {
   auto len = s.size(); // remember initial size
   size_t n = FixedBufferWriter(s.data(), s.size()).print_v(fmt, args).extent();
   s.resize(n);   // always need to resize - if shorter, must clip pre-existing text.
@@ -1142,40 +1089,35 @@ bwprint_v(std::string &s, TextView fmt, std::tuple<Args...> const &args)
  * @note This is intended for direct use. For indirect use (as a backend for another class) see the
  * overload that takes an argument tuple.
  */
-template <typename... Args>
-std::string &
-bwprint(std::string &s, TextView fmt, Args &&... args)
-{
+template<typename... Args>
+std::string&
+bwprint(std::string& s, TextView fmt, Args&& ... args) {
   return bwprint_v(s, fmt, std::forward_as_tuple(args...));
 }
 
 /// @cond COVARY
-template <typename... Args>
+template<typename... Args>
 auto
-FixedBufferWriter::print(TextView fmt, Args &&... args) -> self_type &
-{
-  return static_cast<self_type &>(this->super_type::print_v(fmt, std::forward_as_tuple(args...)));
+FixedBufferWriter::print(TextView fmt, Args&& ... args) -> self_type& {
+  return static_cast<self_type&>(this->super_type::print_v(fmt, std::forward_as_tuple(args...)));
 }
 
-template <typename... Args>
+template<typename... Args>
 auto
-FixedBufferWriter::print_v(TextView fmt, std::tuple<Args...> const &args) -> self_type &
-{
-  return static_cast<self_type &>(this->super_type::print_v(fmt, args));
+FixedBufferWriter::print_v(TextView fmt, std::tuple<Args...> const& args) -> self_type& {
+  return static_cast<self_type&>(this->super_type::print_v(fmt, args));
 }
 
-template <typename... Args>
+template<typename... Args>
 auto
-FixedBufferWriter::print(bwf::Format const &fmt, Args &&... args) -> self_type &
-{
-  return static_cast<self_type &>(this->super_type::print_v(fmt, std::forward_as_tuple(args...)));
+FixedBufferWriter::print(bwf::Format const& fmt, Args&& ... args) -> self_type& {
+  return static_cast<self_type&>(this->super_type::print_v(fmt, std::forward_as_tuple(args...)));
 }
 
-template <typename... Args>
+template<typename... Args>
 auto
-FixedBufferWriter::print_v(bwf::Format const &fmt, std::tuple<Args...> const &args) -> self_type &
-{
-  return static_cast<self_type &>(this->super_type::print_v(fmt, args));
+FixedBufferWriter::print_v(bwf::Format const& fmt, std::tuple<Args...> const& args) -> self_type& {
+  return static_cast<self_type&>(this->super_type::print_v(fmt, args));
 }
 
 /// @endcond
@@ -1183,27 +1125,24 @@ FixedBufferWriter::print_v(bwf::Format const &fmt, std::tuple<Args...> const &ar
 // Special case support for @c Scalar, because @c Scalar is a base utility for some other utilities
 // there can be some unpleasant cirularities if @c Scalar includes BufferWriter formatting. If the
 // support is here then it's fine because anything using BWF for @c Scalar must include this header.
-template <intmax_t N, typename C, typename T> class Scalar;
-namespace detail
-{
-  template <typename T>
-  auto
-  tag_label(BufferWriter &w, const bwf::Spec &, meta::CaseTag<0>) -> void
-  {
-  }
+template<intmax_t N, typename C, typename T> class Scalar;
+namespace detail {
+template<typename T>
+auto
+tag_label(BufferWriter& w, const bwf::Spec&, meta::CaseTag<0>) -> void {
+}
 
-  template <typename T>
-  auto
-  tag_label(BufferWriter &w, const bwf::Spec &, meta::CaseTag<1>) -> decltype(T::label, meta::TypeFunc<void>())
-  {
-    w.print("{}", T::label);
-  }
+template<typename T>
+auto
+tag_label(BufferWriter& w, const bwf::Spec&
+          , meta::CaseTag<1>) -> decltype(T::label, meta::TypeFunc<void>()) {
+  w.print("{}", T::label);
+}
 } // namespace detail
 
-template <intmax_t N, typename C, typename T>
-BufferWriter &
-bwformat(BufferWriter &w, bwf::Spec const &spec, Scalar<N, C, T> const &x)
-{
+template<intmax_t N, typename C, typename T>
+BufferWriter&
+bwformat(BufferWriter& w, bwf::Spec const& spec, Scalar<N, C, T> const& x) {
   bwformat(w, spec, x.value());
   if (!spec.has_numeric_type()) {
     detail::tag_label<T>(w, spec, meta::CaseArg);
@@ -1212,54 +1151,51 @@ bwformat(BufferWriter &w, bwf::Spec const &spec, Scalar<N, C, T> const &x)
 }
 
 // Generically a stream operator is a formatter with the default specification.
-template <typename V>
-BufferWriter &
-operator<<(BufferWriter &w, V &&v)
-{
+template<typename V>
+BufferWriter&
+operator<<(BufferWriter& w, V&& v) {
   return bwformat(w, bwf::Spec::DEFAULT, std::forward<V>(v));
 }
 
 // Basic format wrappers - these are here because they're used internally.
-namespace bwf
-{
-  /** Hex dump wrapper.
-   *
-   * This wrapper indicates the contained view should be dumped as raw memory in hexadecimal format.
-   * This is intended primarily for internal use by other formatting logic.
-   *
-   * @see As_Hex
-   */
-  struct HexDump {
-    std::string_view _view; ///< A view of the memory to dump.
-
-    /** Dump @a n bytes starting at @a mem as hex.
-     *
-     * @param mem First byte of memory to dump.
-     * @param n Number of bytes.
-     */
-    HexDump(void const *mem, size_t n) : _view(static_cast<char const *>(mem), n) {}
-  };
+namespace bwf {
+/** Hex dump wrapper.
+ *
+ * This wrapper indicates the contained view should be dumped as raw memory in hexadecimal format.
+ * This is intended primarily for internal use by other formatting logic.
+ *
+ * @see As_Hex
+ */
+struct HexDump {
+  std::string_view _view; ///< A view of the memory to dump.
 
-  /** Treat @a t as raw memory and dump the memory as hexadecimal.
-   *
-   * @tparam T Type of argument.
-   * @param t Object to dump.
-   * @return @a A wrapper to do a hex dump.
-   *
-   * This is the standard way to do a hexadecimal memory dump of an object.
+  /** Dump @a n bytes starting at @a mem as hex.
    *
-   * @internal This function exists so that other types can overload it for special processing,
-   * which would not be possible with just @c HexDump.
+   * @param mem First byte of memory to dump.
+   * @param n Number of bytes.
    */
-  template <typename T>
-  HexDump
-  As_Hex(T const &t)
-  {
-    return HexDump(&t, sizeof(T));
-  }
+  HexDump(void const *mem, size_t n) : _view(static_cast<char const *>(mem), n) {}
+};
+
+/** Treat @a t as raw memory and dump the memory as hexadecimal.
+ *
+ * @tparam T Type of argument.
+ * @param t Object to dump.
+ * @return @a A wrapper to do a hex dump.
+ *
+ * This is the standard way to do a hexadecimal memory dump of an object.
+ *
+ * @internal This function exists so that other types can overload it for special processing,
+ * which would not be possible with just @c HexDump.
+ */
+template<typename T>
+HexDump
+As_Hex(T const& t) {
+  return HexDump(&t, sizeof(T));
+}
 
 } // namespace bwf
 
-BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, bwf::HexDump const &hex);
+BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, bwf::HexDump const& hex);
 
-} // namespace SWOC_NAMESPACE
+}} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/bwf_ex.h b/swoc++/include/swoc/bwf_ex.h
index 5e8a280..1e59a4a 100644
--- a/swoc++/include/swoc/bwf_ex.h
+++ b/swoc++/include/swoc/bwf_ex.h
@@ -14,198 +14,200 @@
 #include "swoc/bwf_base.h"
 #include "swoc/swoc_meta.h"
 
-namespace SWOC_NAMESPACE
-{
-namespace bwf
-{
-  using namespace SWOC_NAMESPACE::literals; // enable ""sv
-
-  /** Output @a text @a n times.
-   *
-   */
-  struct Pattern {
-    int _n;                 ///< # of instances of @a pattern.
-    std::string_view _text; ///< output text.
-  };
-
-  /** Format wrapper for @c errno.
-   * This stores a copy of the argument or @c errno if an argument isn't provided. The output
-   * is then formatted with the short, long, and numeric value of @c errno. If the format specifier
-   * is type 'd' then just the numeric value is printed.
-   */
-  struct Errno {
-    int _e;
-    explicit Errno(int e = errno) : _e(e) {}
-  };
-
-  /** Format wrapper for time stamps.
-   * If the time isn't provided, the current epoch time is used. If the format string isn't
-   * provided a format like "2017 Jun 29 14:11:29" is used.
-   */
-  struct Date {
-    static constexpr std::string_view DEFAULT_FORMAT{"%Y %b %d %H:%M:%S"_sv};
-    time_t _epoch;
-    std::string_view _fmt;
-    Date(time_t t, std::string_view fmt = DEFAULT_FORMAT) : _epoch(t), _fmt(fmt) {}
-    Date(std::string_view fmt = DEFAULT_FORMAT);
-  };
-
-  namespace detail
-  {
-    // Special case conversions - these handle nullptr because the @c std::string_view spec is stupid.
-    inline std::string_view
-    FirstOfConverter(std::nullptr_t) {
-      return std::string_view{};
-    }
-    inline std::string_view
-    FirstOfConverter(char const *s) {
-      return std::string_view{s ? s : ""};
-    }
-    // Otherwise do any compliant conversion.
-    template <typename T>
-    std::string_view
-    FirstOfConverter(T &&t) {
-      return t;
-    }
-  } // namespace detail
-
-  /// Print the first of a list of strings that is not an empty string.
-  /// All arguments must be convertible to @c std::string.
-  template <typename... Args>
-  std::string_view
-  FirstOf(Args &&... args) {
-    std::array<std::string_view, sizeof...(args)> strings{{detail::FirstOfConverter(args)...}};
-    for (auto &s : strings)
-    {
-      if (!s.empty())
-        return s;
-    }
-    return std::string_view{};
-  };
-
-  /** Wrapper for a sub-text, where the @a args are output according to @a fmt.
-   *
-   * @tparam Args Argument types.
-   */
-  template <typename... Args> struct SubText {
-    using arg_pack = std::tuple<Args...>; ///< The pack of arguments for format string.
-    TextView _fmt;                        ///< Format string. If empty, do not generate output.
-    arg_pack _args;                       ///< Arguments to format string.
-
-    /// Construct with a specific @a fmt and @a args.
-    SubText(TextView fmt, arg_pack const &args) : _fmt(fmt), _args(args){};
-
-    /// Check for output not enabled.
-    bool operator!() const;
-
-    /// Check for output enabled.
-    explicit operator bool() const;
-  };
-
-  template <typename... Args> SubText<Args...>::operator bool() const { return !_fmt.empty(); }
-
-  template <typename... Args> bool SubText<Args...>::operator!() const { return _fmt.empty(); }
-
-  /** Optional printing wrapper.
-   *
-   * @tparam Args Arguments for output.
-   * @param flag Generate output flag.
-   * @param fmt Format for output and args.
-   * @param args The arguments.
-   * @return A wrapper for the optional text.
-   *
-   * This function is passed a @a flag, a printing format @a fmt, and a set of arguments @a args to
-   * be used by the format. Output is generated if @a flag is @c true, otherwise the empty string
-   * (no output) is generated. For example, if in a function there was a flag to determine if an
-   * extra tag with delimiters, e.g. "[tag]", was to be generated, this could be done with
-   *
-   * @code
-   *   w.print("Some other text{}.", bwf::If(flag, " [{}]", tag));
-   * @endcode
-   *
-   * @internal To disambiguate overloads, this is enabled only if there is at least one argument
-   * to be passed to the format string.
-   */
-  template <typename... Args>
-  SubText<Args...>
-  If(bool flag, TextView const &fmt, Args &&... args) {
-    return SubText<Args...>(flag ? fmt : TextView{}, std::forward_as_tuple(args...));
-  }
+namespace swoc { inline namespace SWOC_VERSION_NS {
+namespace bwf {
+using namespace swoc::literals; // enable ""sv
+
+/** Output @a text @a n times.
+ *
+ */
+struct Pattern {
+  int _n;                 ///< # of instances of @a pattern.
+  std::string_view _text; ///< output text.
+};
+
+/** Format wrapper for @c errno.
+ * This stores a copy of the argument or @c errno if an argument isn't provided. The output
+ * is then formatted with the short, long, and numeric value of @c errno. If the format specifier
+ * is type 'd' then just the numeric value is printed.
+ */
+struct Errno {
+  int _e;
+
+  explicit Errno(int e = errno) : _e(e) {}
+};
+
+/** Format wrapper for time stamps.
+ * If the time isn't provided, the current epoch time is used. If the format string isn't
+ * provided a format like "2017 Jun 29 14:11:29" is used.
+ */
+struct Date {
+  static constexpr std::string_view DEFAULT_FORMAT{"%Y %b %d %H:%M:%S"_sv};
+  time_t _epoch;
+  std::string_view _fmt;
 
-  namespace detail
-  {
-    // @a T has the @c empty() method.
-    template <typename T>
-    auto
-    Optional(meta::CaseTag<2>, TextView fmt, T &&t) -> decltype(void(t.empty()), meta::TypeFunc<SubText<T>>()) {
-      return SubText<T>(t.empty() ? TextView{} : fmt, std::forward_as_tuple(t));
-    }
-
-    // @a T is convertible to @c bool.
-    template <typename T>
-    auto
-    Optional(meta::CaseTag<1>, TextView fmt, T &&t) -> decltype(bool(t), meta::TypeFunc<SubText<T>>()) {
-      return SubText<T>(bool(t) ? fmt : TextView{}, std::forward_as_tuple(t));
-    }
-
-    // @a T is not optional, always print.
-    template <typename T>
-    auto
-    Optional(meta::CaseTag<0>, TextView fmt, T &&t) -> SubText<T> {
-      return SubText<T>(fmt, std::forward_as_tuple(t));
-    }
-  } // namespace detail
-
-  /** Simplified optional text wrapper.
-   *
-   * @tparam ARG the type of the (single) argument.
-   * @param fmt Format string.
-   * @param arg The single argument to the format string and predicate.
-   * @return An optional text wrapper.
-   *
-   * This generates output iff @a arg is not empty. @a fmt is required to take only a single
-   * argument, which will be @a arg. This is a convenience overload, to handle the common case
-   * where the argument and the conditional are the same. The argument must have one of the
-   * following properties in order to serve as the conditional. These are checked in order.
-   *
-   * - The @c empty() method which returns @c true if the argument is empty and should not be printed.
-   *   This handles the case of C++ string types.
-   *
-   * - Conversion to @c bool which is @c false if the argument should not be printed. This covers the
-   *   case of pointers.
-   *
-   * As an example, if an output function had three strings @a alpha, @a bravo, and
-   * @a charlie, each of which could be null, which should be output with space separators,
-   * this would be
-   * @code
-   * w.print("Leading text{}{}{}.", Optiona(" {}", alpha)
-   *                              , Optional(" {}", bravo)
-   *                              , Optional(" {}", charlie));
-   * @endcode
-   *
-   * Because of the property handling, these strings can be C styles strings ( @c char* ) or C++
-   * string types (such as @c std::string_view ).
-   *
-   */
-  template <typename ARG>
-  SubText<ARG>
-  Optional(TextView fmt, ARG &&arg) {
-    return detail::Optional(meta::CaseArg, fmt, std::forward<ARG>(arg));
+  Date(time_t t, std::string_view fmt = DEFAULT_FORMAT) : _epoch(t), _fmt(fmt) {}
+
+  Date(std::string_view fmt = DEFAULT_FORMAT);
+};
+
+namespace detail {
+// Special case conversions - these handle nullptr because the @c std::string_view spec is stupid.
+inline std::string_view
+FirstOfConverter(std::nullptr_t) {
+  return std::string_view{};
+}
+
+inline std::string_view
+FirstOfConverter(char const *s) {
+  return std::string_view{s ? s : ""};
+}
+
+// Otherwise do any compliant conversion.
+template<typename T>
+std::string_view
+FirstOfConverter(T&& t) {
+  return t;
+}
+} // namespace detail
+
+/// Print the first of a list of strings that is not an empty string.
+/// All arguments must be convertible to @c std::string.
+template<typename... Args>
+std::string_view
+FirstOf(Args&& ... args) {
+  std::array<std::string_view, sizeof...(args)> strings{{detail::FirstOfConverter(args)...}};
+  for (auto& s : strings) {
+    if (!s.empty())
+      return s;
   }
+  return std::string_view{};
+};
+
+/** Wrapper for a sub-text, where the @a args are output according to @a fmt.
+ *
+ * @tparam Args Argument types.
+ */
+template<typename... Args> struct SubText {
+  using arg_pack = std::tuple<Args...>; ///< The pack of arguments for format string.
+  TextView _fmt;                        ///< Format string. If empty, do not generate output.
+  arg_pack _args;                       ///< Arguments to format string.
+
+  /// Construct with a specific @a fmt and @a args.
+  SubText(TextView fmt, arg_pack const& args) : _fmt(fmt), _args(args) {};
+
+  /// Check for output not enabled.
+  bool operator!() const;
+
+  /// Check for output enabled.
+  explicit operator bool() const;
+};
+
+template<typename... Args> SubText<Args...>::operator bool() const { return !_fmt.empty(); }
+
+template<typename... Args> bool SubText<Args...>::operator!() const { return _fmt.empty(); }
+
+/** Optional printing wrapper.
+ *
+ * @tparam Args Arguments for output.
+ * @param flag Generate output flag.
+ * @param fmt Format for output and args.
+ * @param args The arguments.
+ * @return A wrapper for the optional text.
+ *
+ * This function is passed a @a flag, a printing format @a fmt, and a set of arguments @a args to
+ * be used by the format. Output is generated if @a flag is @c true, otherwise the empty string
+ * (no output) is generated. For example, if in a function there was a flag to determine if an
+ * extra tag with delimiters, e.g. "[tag]", was to be generated, this could be done with
+ *
+ * @code
+ *   w.print("Some other text{}.", bwf::If(flag, " [{}]", tag));
+ * @endcode
+ *
+ * @internal To disambiguate overloads, this is enabled only if there is at least one argument
+ * to be passed to the format string.
+ */
+template<typename... Args>
+SubText<Args...>
+If(bool flag, TextView const& fmt, Args&& ... args) {
+  return SubText<Args...>(flag ? fmt : TextView{}, std::forward_as_tuple(args...));
+}
+
+namespace detail {
+// @a T has the @c empty() method.
+template<typename T>
+auto
+Optional(meta::CaseTag<2>, TextView fmt
+         , T&& t) -> decltype(void(t.empty()), meta::TypeFunc<SubText<T>>()) {
+  return SubText<T>(t.empty() ? TextView{} : fmt, std::forward_as_tuple(t));
+}
+
+// @a T is convertible to @c bool.
+template<typename T>
+auto
+Optional(meta::CaseTag<1>, TextView fmt, T&& t) -> decltype(bool(t), meta::TypeFunc<SubText<T>>()) {
+  return SubText<T>(bool(t) ? fmt : TextView{}, std::forward_as_tuple(t));
+}
+
+// @a T is not optional, always print.
+template<typename T>
+auto
+Optional(meta::CaseTag<0>, TextView fmt, T&& t) -> SubText<T> {
+  return SubText<T>(fmt, std::forward_as_tuple(t));
+}
+} // namespace detail
+
+/** Simplified optional text wrapper.
+ *
+ * @tparam ARG the type of the (single) argument.
+ * @param fmt Format string.
+ * @param arg The single argument to the format string and predicate.
+ * @return An optional text wrapper.
+ *
+ * This generates output iff @a arg is not empty. @a fmt is required to take only a single
+ * argument, which will be @a arg. This is a convenience overload, to handle the common case
+ * where the argument and the conditional are the same. The argument must have one of the
+ * following properties in order to serve as the conditional. These are checked in order.
+ *
+ * - The @c empty() method which returns @c true if the argument is empty and should not be printed.
+ *   This handles the case of C++ string types.
+ *
+ * - Conversion to @c bool which is @c false if the argument should not be printed. This covers the
+ *   case of pointers.
+ *
+ * As an example, if an output function had three strings @a alpha, @a bravo, and
+ * @a charlie, each of which could be null, which should be output with space separators,
+ * this would be
+ * @code
+ * w.print("Leading text{}{}{}.", Optiona(" {}", alpha)
+ *                              , Optional(" {}", bravo)
+ *                              , Optional(" {}", charlie));
+ * @endcode
+ *
+ * Because of the property handling, these strings can be C styles strings ( @c char* ) or C++
+ * string types (such as @c std::string_view ).
+ *
+ */
+template<typename ARG>
+SubText<ARG>
+Optional(TextView fmt, ARG&& arg) {
+  return detail::Optional(meta::CaseArg, fmt, std::forward<ARG>(arg));
+}
 } // namespace bwf
 
-BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, bwf::Pattern const &pattern);
-BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, bwf::Errno const &e);
-BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, bwf::Date const &date);
+BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, bwf::Pattern const& pattern);
+
+BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, bwf::Errno const& e);
+
+BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, bwf::Date const& date);
 
-template <typename... Args>
-BufferWriter &
-bwformat(BufferWriter &w, bwf::Spec const &spec, bwf::SubText<Args...> const &subtext) {
-  if (!subtext._fmt.empty())
-  {
+template<typename... Args>
+BufferWriter&
+bwformat(BufferWriter& w, bwf::Spec const& spec, bwf::SubText<Args...> const& subtext) {
+  if (!subtext._fmt.empty()) {
     w.print_v(subtext._fmt, subtext._args);
   }
   return w;
 }
 
-} // namespace SWOC_NAMESPACE
+}} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/bwf_ip.h b/swoc++/include/swoc/bwf_ip.h
index 9c92530..b2a56b6 100644
--- a/swoc++/include/swoc/bwf_ip.h
+++ b/swoc++/include/swoc/bwf_ip.h
@@ -14,29 +14,37 @@
 #include "swoc/bwf_base.h"
 #include "swoc/swoc_ip.h"
 
-namespace SWOC_NAMESPACE
-{
+namespace swoc { inline namespace SWOC_VERSION_NS {
+
 // All of these expect the address to be in network order.
-BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, sockaddr const *addr);
-BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, in6_addr const &addr);
-BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, sockaddr const *addr);
+BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, sockaddr const *addr);
+
+BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, in6_addr const& addr);
+
+BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, sockaddr const *addr);
+
 // Use class information for ordering.
-BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, IP4Addr const &addr);
-BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, IP6Addr const &addr);
-BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, IPAddr const &addr);
-BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, IP4Range const &Range);
-BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, IP6Range const &Range);
-BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, IPRange const &Range);
-
-inline BufferWriter &
-bwformat(BufferWriter &w, bwf::Spec const &spec, IPEndpoint const &addr) {
+BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, IP4Addr const& addr);
+
+BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, IP6Addr const& addr);
+
+BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, IPAddr const& addr);
+
+BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, IP4Range const& Range);
+
+BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, IP6Range const& Range);
+
+BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, IPRange const& Range);
+
+inline BufferWriter&
+bwformat(BufferWriter& w, bwf::Spec const& spec, IPEndpoint const& addr) {
   return bwformat(w, spec, &addr.sa);
 }
 
 /// Buffer space sufficient for printing any basic IP address type.
 static const size_t IP_STREAM_SIZE = 80;
 
-} // namespace SWOC_NAMESPACE
+}} // namespace swoc
 
 namespace std {
 inline ostream &
diff --git a/swoc++/include/swoc/ext/HashFNV.h b/swoc++/include/swoc/ext/HashFNV.h
index a495efc..00f70e3 100644
--- a/swoc++/include/swoc/ext/HashFNV.h
+++ b/swoc++/include/swoc/ext/HashFNV.h
@@ -25,10 +25,11 @@
 #pragma once
 
 #include <cstdint>
+
 #include "swoc/TextView.h"
 
-namespace SWOC_NAMESPACE
-{
+namespace swoc { inline namespace SWOC_VERSION_NS {
+
 struct Hash32FNV1a {
 protected:
   using self_type                = Hash32FNV1a;
@@ -39,19 +40,19 @@ public:
 
   Hash32FNV1a() = default;
 
-  self_type &update(std::string_view const &data);
+  self_type& update(std::string_view const& data);
 
-  self_type & final();
+  self_type& final();
 
   value_type get() const;
 
-  self_type &clear();
+  self_type& clear();
 
-  template <typename X, typename V> self_type &update(TransformView<X, V> view);
+  template<typename X, typename V> self_type& update(TransformView <X, V> view);
 
-  template <typename X, typename V> value_type hash_immediate(TransformView<X, V> const &view);
+  template<typename X, typename V> value_type hash_immediate(TransformView <X, V> const& view);
 
-  value_type hash_immediate(std::string_view const &data);
+  value_type hash_immediate(std::string_view const& data);
 
 private:
   value_type hval{INIT};
@@ -67,19 +68,19 @@ public:
 
   Hash64FNV1a() = default;
 
-  self_type &update(std::string_view const &data);
+  self_type& update(std::string_view const& data);
 
-  self_type & final();
+  self_type& final();
 
   value_type get() const;
 
-  self_type &clear();
+  self_type& clear();
 
-  template <typename X, typename V> self_type &update(TransformView<X, V> view);
+  template<typename X, typename V> self_type& update(TransformView <X, V> view);
 
-  template <typename X, typename V> value_type hash_immediate(TransformView<X, V> const &view);
+  template<typename X, typename V> value_type hash_immediate(TransformView <X, V> const& view);
 
-  value_type hash_immediate(std::string_view const &data);
+  value_type hash_immediate(std::string_view const& data);
 
 private:
   value_type hval{INIT};
@@ -91,16 +92,14 @@ private:
 // -- 32 --
 
 inline auto
-Hash32FNV1a::clear() -> self_type &
-{
+Hash32FNV1a::clear() -> self_type& {
   hval = INIT;
   return *this;
 }
 
-template <typename X, typename V>
+template<typename X, typename V>
 auto
-Hash32FNV1a::update(TransformView<X, V> view) -> self_type &
-{
+Hash32FNV1a::update(TransformView <X, V> view) -> self_type& {
   for (; view; ++view) {
     hval ^= static_cast<value_type>(*view);
     hval += (hval << 1) + (hval << 4) + (hval << 7) + (hval << 8) + (hval << 24);
@@ -109,49 +108,42 @@ Hash32FNV1a::update(TransformView<X, V> view) -> self_type &
 }
 
 inline auto
-Hash32FNV1a::update(std::string_view const &data) -> self_type &
-{
+Hash32FNV1a::update(std::string_view const& data) -> self_type& {
   return this->update(transform_view_of(data));
 }
 
 inline auto
-Hash32FNV1a::final() -> self_type &
-{
+Hash32FNV1a::final() -> self_type& {
   return *this;
 }
 
 inline auto
-Hash32FNV1a::get() const -> value_type
-{
+Hash32FNV1a::get() const -> value_type {
   return hval;
 }
 
-template <typename X, typename V>
+template<typename X, typename V>
 auto
-Hash32FNV1a::hash_immediate(swoc::TransformView<X, V> const &view) -> value_type
-{
+Hash32FNV1a::hash_immediate(swoc::TransformView<X, V> const& view) -> value_type {
   return this->update(view).get();
 }
 
 inline auto
-Hash32FNV1a::hash_immediate(std::string_view const &data) -> value_type
-{
+Hash32FNV1a::hash_immediate(std::string_view const& data) -> value_type {
   return this->update(data).final().get();
 }
 
 // -- 64 --
 
 inline auto
-Hash64FNV1a::clear() -> self_type &
-{
+Hash64FNV1a::clear() -> self_type& {
   hval = INIT;
   return *this;
 }
 
-template <typename X, typename V>
+template<typename X, typename V>
 auto
-Hash64FNV1a::update(TransformView<X, V> view) -> self_type &
-{
+Hash64FNV1a::update(TransformView <X, V> view) -> self_type& {
   for (; view; ++view) {
     hval ^= static_cast<value_type>(*view);
     hval += (hval << 1) + (hval << 4) + (hval << 5) + (hval << 7) + (hval << 8) + (hval << 40);
@@ -160,34 +152,29 @@ Hash64FNV1a::update(TransformView<X, V> view) -> self_type &
 }
 
 inline auto
-Hash64FNV1a::update(std::string_view const &data) -> self_type &
-{
+Hash64FNV1a::update(std::string_view const& data) -> self_type& {
   return this->update(transform_view_of(data));
 }
 
 inline auto
-Hash64FNV1a::final() -> self_type &
-{
+Hash64FNV1a::final() -> self_type& {
   return *this;
 }
 
 inline auto
-Hash64FNV1a::get() const -> value_type
-{
+Hash64FNV1a::get() const -> value_type {
   return hval;
 }
 
-template <typename X, typename V>
+template<typename X, typename V>
 auto
-Hash64FNV1a::hash_immediate(swoc::TransformView<X, V> const &view) -> value_type
-{
+Hash64FNV1a::hash_immediate(swoc::TransformView<X, V> const& view) -> value_type {
   return this->update(view).final().get();
 }
 
 inline auto
-Hash64FNV1a::hash_immediate(std::string_view const &data) -> value_type
-{
+Hash64FNV1a::hash_immediate(std::string_view const& data) -> value_type {
   return this->update(data).final().get();
 }
 
-} // namespace SWOC_NAMESPACE
+}} // namespace swoc
diff --git a/swoc++/include/swoc/swoc_file.h b/swoc++/include/swoc/swoc_file.h
index 253303c..8621c9f 100644
--- a/swoc++/include/swoc/swoc_file.h
+++ b/swoc++/include/swoc/swoc_file.h
@@ -16,218 +16,221 @@
 #include "swoc/swoc_version.h"
 #include "swoc/TextView.h"
 
-namespace SWOC_NAMESPACE
-{
-namespace file
-{
-  /** Utility class for file system paths.
-   */
-  class path {
-    using self_type = path;
+namespace swoc { inline namespace SWOC_VERSION_NS {
+namespace file {
+/** Utility class for file system paths.
+ */
+class path {
+  using self_type = path;
 
-  public:
-    static constexpr char SEPARATOR = '/';
+public:
+  static constexpr char SEPARATOR = '/';
 
-    /// Default construct empty path.
-    path() = default;
+  /// Default construct empty path.
+  path() = default;
 
-    /// Copy constructor - copies the path.
-    path(const self_type &that) = default;
+  /// Copy constructor - copies the path.
+  path(const self_type& that) = default;
 
-    /// Move constructor.
-    path(self_type &&that) = default;
+  /// Move constructor.
+  path(self_type&& that) = default;
 
-    /// Construct from a null terminated string.
-    explicit path(const char *src);
+  /// Construct from a null terminated string.
+  explicit path(const char *src);
 
-    /// Construct from a string view.
-    path(std::string_view src);
-    //  template < typename ... Args > explicit path(std::string_view base, Args... rest);
+  /// Construct from a string view.
+  path(std::string_view src);
+  //  template < typename ... Args > explicit path(std::string_view base, Args... rest);
 
-    /// Move from an existing string
-    path(std::string &&that);
+  /// Move from an existing string
+  path(std::string&& that);
 
-    /// Replace the path with a copy of @a that.
-    self_type &operator=(const self_type &that) = default;
+  /// Replace the path with a copy of @a that.
+  self_type& operator=(const self_type& that) = default;
 
-    /// Replace the path with the contents of @a that.
-    self_type &operator=(self_type &&that) = default;
+  /// Replace the path with the contents of @a that.
+  self_type& operator=(self_type&& that) = default;
 
-    /// Assign @a p as the path.
-    self_type &operator=(std::string_view p);
+  /// Assign @a p as the path.
+  self_type& operator=(std::string_view p);
 
-    /** Append or replace path with @a that.
-     *
-     * If @a that is absolute, it replaces @a this. Otherwise @a that is appended with exactly one
-     * separator.
-     *
-     * @param that Filesystem path.
-     * @return @a this
-     */
-    self_type &operator/=(const self_type &that);
-    self_type &operator/=(std::string_view that);
+  /** Append or replace path with @a that.
+   *
+   * If @a that is absolute, it replaces @a this. Otherwise @a that is appended with exactly one
+   * separator.
+   *
+   * @param that Filesystem path.
+   * @return @a this
+   */
+  self_type& operator/=(const self_type& that);
 
-    /// Check if the path is empty.
-    bool empty() const;
+  self_type& operator/=(std::string_view that);
 
-    /// Check if the path is absolute.
-    bool is_absolute() const;
+  /// Check if the path is empty.
+  bool empty() const;
 
-    /// Check if the path is not absolute.
-    bool is_relative() const;
+  /// Check if the path is absolute.
+  bool is_absolute() const;
 
-    self_type parent_path() const;
+  /// Check if the path is not absolute.
+  bool is_relative() const;
 
-    /// Access the path explicitly.
-    char const *c_str() const;
+  self_type parent_path() const;
 
-    /// The path as a string.
-    std::string const &string() const;
+  /// Access the path explicitly.
+  char const *c_str() const;
 
-    /// A view of the path.
-    swoc::TextView view() const;
+  /// The path as a string.
+  std::string const& string() const;
 
-  protected:
-    std::string _path; ///< File path.
-  };
+  /// A view of the path.
+  swoc::TextView view() const;
 
-  /// Information about a file.
-  class file_status {
-    using self_type = file_status;
+protected:
+  std::string _path; ///< File path.
+};
 
-  protected:
-    struct ::stat _stat; ///< File information.
+/// Information about a file.
+class file_status {
+  using self_type = file_status;
 
-    friend self_type status(const path &file, std::error_code &ec) noexcept;
+protected:
+  struct ::stat _stat; ///< File information.
 
-    friend int file_type(const self_type &);
-    friend off_t file_size(const self_type &);
-    friend bool is_regular_file(const file_status &);
-    friend bool is_dir(const file_status &);
-    friend bool is_char_device(const file_status &);
-    friend bool is_block_device(const file_status &);
-  };
+  friend self_type status(const path& file, std::error_code& ec) noexcept;
 
-  /** Get the status of the file at @a p.
-   *
-   * @param file Path to file.
-   * @param ec Error code return.
-   * @return Status of the file.
-   */
-  file_status status(const path &file, std::error_code &ec) noexcept;
+  friend int file_type(const self_type&);
 
-  // Related free functions.
-  // These are separate because they are not part of std::filesystem::path.
+  friend off_t file_size(const self_type&);
 
-  /// Return the file type value.
-  int file_type(const file_status &fs);
+  friend bool is_regular_file(const file_status&);
 
-  /// Check if the path is to a regular file.
-  bool is_regular_file(const file_status &fs);
+  friend bool is_dir(const file_status&);
 
-  /// Check if the path is to a directory.
-  bool is_dir(const file_status &p);
+  friend bool is_char_device(const file_status&);
 
-  /// Check if the path is to a character device.
-  bool is_char_device(const file_status &fs);
+  friend bool is_block_device(const file_status&);
+};
 
-  /// Check if the path is to a block device.
-  bool is_block_device(const file_status &fs);
+/** Get the status of the file at @a p.
+ *
+ * @param file Path to file.
+ * @param ec Error code return.
+ * @return Status of the file.
+ */
+file_status status(const path& file, std::error_code& ec) noexcept;
 
-  /// Size of the file or block device.
-  off_t file_size(const file_status &fs);
+// Related free functions.
+// These are separate because they are not part of std::filesystem::path.
 
-  /// Check if file is readable.
-  bool is_readable(const path &s);
+/// Return the file type value.
+int file_type(const file_status& fs);
 
-  /** Load the file at @a p into a @c std::string.
-   *
-   * @param p Path to file
-   * @param ec Error code result of the file operation.
-   * @return The contents of the file.
-   */
-  std::string load(const path &p, std::error_code &ec);
+/// Check if the path is to a regular file.
+bool is_regular_file(const file_status& fs);
 
-  /* ------------------------------------------------------------------- */
+/// Check if the path is to a directory.
+bool is_dir(const file_status& p);
 
-  inline path::path(char const *src) : _path(src) {}
+/// Check if the path is to a character device.
+bool is_char_device(const file_status& fs);
 
-  inline path::path(std::string_view base) : _path(base) {}
+/// Check if the path is to a block device.
+bool is_block_device(const file_status& fs);
 
-  inline path::path(std::string &&that) : _path(std::move(that)) {}
+/// Size of the file or block device.
+off_t file_size(const file_status& fs);
 
-  inline path &
-  path::operator=(std::string_view p) {
-    _path.assign(p);
-    return *this;
-  }
+/// Check if file is readable.
+bool is_readable(const path& s);
 
-  inline char const *
-  path::c_str() const {
-    return _path.c_str();
-  }
+/** Load the file at @a p into a @c std::string.
+ *
+ * @param p Path to file
+ * @param ec Error code result of the file operation.
+ * @return The contents of the file.
+ */
+std::string load(const path& p, std::error_code& ec);
 
-  inline std::string const &
-  path::string() const {
-    return _path;
-  }
+/* ------------------------------------------------------------------- */
 
-  inline swoc::TextView
-  path::view() const {
-    return _path;
-  }
+inline path::path(char const *src) : _path(src) {}
 
-  inline bool
-  path::empty() const {
-    return _path.empty();
-  }
+inline path::path(std::string_view base) : _path(base) {}
 
-  inline bool
-  path::is_absolute() const {
-    return !_path.empty() && '/' == _path[0];
-  }
+inline path::path(std::string&& that) : _path(std::move(that)) {}
 
-  inline bool
-  path::is_relative() const {
-    return !this->is_absolute();
-  }
+inline path&
+path::operator=(std::string_view p) {
+  _path.assign(p);
+  return *this;
+}
 
-  inline path &
-  path::operator/=(const self_type &that) {
-    return *this /= std::string_view(that._path);
-  }
+inline char const *
+path::c_str() const {
+  return _path.c_str();
+}
 
-  /** Combine two strings as file paths.
+inline std::string const&
+path::string() const {
+  return _path;
+}
 
-       @return A @c path with the combined path.
-  */
-  inline path
-  operator/(const path &lhs, const path &rhs) {
-    return path(lhs) /= rhs;
-  }
+inline swoc::TextView
+path::view() const {
+  return _path;
+}
 
-  inline path
-  operator/(path &&lhs, const path &rhs) {
-    return path(std::move(lhs)) /= rhs;
-  }
+inline bool
+path::empty() const {
+  return _path.empty();
+}
+
+inline bool
+path::is_absolute() const {
+  return !_path.empty() && '/' == _path[0];
+}
+
+inline bool
+path::is_relative() const {
+  return !this->is_absolute();
+}
+
+inline path&
+path::operator/=(const self_type& that) {
+  return *this /= std::string_view(that._path);
+}
 
-  inline path
-  operator/(const path &lhs, std::string_view rhs) {
-    return path(lhs) /= rhs;
-  }
+/** Combine two strings as file paths.
 
-  inline path
-  operator/(path &&lhs, std::string_view rhs) {
-    return path(std::move(lhs)) /= rhs;
-  }
+     @return A @c path with the combined path.
+*/
+inline path
+operator/(const path& lhs, const path& rhs) {
+  return path(lhs) /= rhs;
+}
+
+inline path
+operator/(path&& lhs, const path& rhs) {
+  return path(std::move(lhs)) /= rhs;
+}
+
+inline path
+operator/(const path& lhs, std::string_view rhs) {
+  return path(lhs) /= rhs;
+}
+
+inline path
+operator/(path&& lhs, std::string_view rhs) {
+  return path(std::move(lhs)) /= rhs;
+}
 
 } // namespace file
 
 class BufferWriter;
-namespace bwf
-{
-  struct Spec;
+namespace bwf {
+struct Spec;
 }
 
-BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, file::path const &p);
-} // namespace SWOC_NAMESPACE
+BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, file::path const& p);
+}} // namespace swoc
diff --git a/swoc++/include/swoc/swoc_ip.h b/swoc++/include/swoc/swoc_ip.h
index a9c7469..7001b89 100644
--- a/swoc++/include/swoc/swoc_ip.h
+++ b/swoc++/include/swoc/swoc_ip.h
@@ -15,17 +15,26 @@
 #include "swoc/RBTree.h"
 #include <values.h>
 
-namespace SWOC_NAMESPACE {
+namespace swoc { inline namespace SWOC_VERSION_NS {
 
 class IP4Addr;
+
 class IP6Addr;
+
 class IPAddr;
+
 class IPMask;
+
 class IP4Range;
+
 class IP6Range;
+
 class IPRange;
+
 class IP4Net;
+
 class IP6Net;
+
 class IPNet;
 
 using ::std::string_view;
@@ -56,7 +65,7 @@ union IPEndpoint {
   explicit IPEndpoint(IPAddr const& addr);
 
   // Construct from @c sockaddr
-  IPEndpoint(sockaddr const * sa);
+  IPEndpoint(sockaddr const *sa);
 
   /** Break a string in to IP address relevant tokens.
    *
@@ -563,10 +572,15 @@ public:
   self_type& operator=(in6_addr const& ip);
 
   bool operator==(self_type const& that) const;
+
   bool operator!=(self_type const& that) const;
-  bool operator< (self_type const& that) const;
-  bool operator> (self_type const& that) const;
+
+  bool operator<(self_type const& that) const;
+
+  bool operator>(self_type const& that) const;
+
   bool operator<=(self_type const& that) const;
+
   bool operator>=(self_type const& that) const;
 
   /// Assign from @c sockaddr
@@ -1052,6 +1066,7 @@ public:
   bool empty() const;
 
   IP4Range const& ip4() const { return _range._ip4; }
+
   IP6Range const& ip6() const { return _range._ip6; }
 
   class NetSource;
@@ -1330,12 +1345,14 @@ public:
   IPRange as_range() const;
 
   bool is_ip4() const { return _addr.is_ip4(); }
+
   bool is_ip6() const { return _addr.is_ip6(); }
 
   sa_family_t family() const { return _addr.family(); }
 
   IP4Net ip4() const { return IP4Net{_addr.ip4(), _mask}; }
-  IP6Net ip6() const { return IP6Net{_addr.ip6(), _mask};}
+
+  IP6Net ip6() const { return IP6Net{_addr.ip6(), _mask}; }
 
   /** Assign an @a addr and @a mask to @a this.
    *
@@ -1472,7 +1489,7 @@ public:
     const_iterator(self_type const& that);
 
     /// Assignment.
-    self_type & operator=(self_type const& that);
+    self_type& operator=(self_type const& that);
 
     /// Pre-increment.
     /// Move to the next element in the list.
@@ -1560,7 +1577,7 @@ public:
     iterator(self_type const& that);
 
     /// Assignment.
-    self_type & operator=(self_type const& that);
+    self_type& operator=(self_type const& that);
 
     /// Pre-increment.
     /// Move to the next element in the list.
@@ -1632,7 +1649,7 @@ public:
    * @return The payload if any, @c nullptr if the address is not in the space.
    */
   iterator find(IP6Addr const& addr) {
-    return { _ip4.end(), _ip6.find(addr) };
+    return {_ip4.end(), _ip6.find(addr)};
   }
 
   /// @return A constant iterator to the first element.
@@ -1667,7 +1684,7 @@ IPSpace<PAYLOAD>::const_iterator::const_iterator(self_type const& that) {
 }
 
 template<typename PAYLOAD>
-auto IPSpace<PAYLOAD>::const_iterator::operator=(self_type const& that) -> self_type &{
+auto IPSpace<PAYLOAD>::const_iterator::operator=(self_type const& that) -> self_type& {
   _iter_4 = that._iter_4;
   _iter_6 = that._iter_6;
   new(&_value) value_type{that._value};
@@ -1758,7 +1775,7 @@ IPSpace<PAYLOAD>::iterator::iterator(self_type const& that) {
 }
 
 template<typename PAYLOAD>
-auto IPSpace<PAYLOAD>::iterator::operator=(self_type const& that) -> self_type & {
+auto IPSpace<PAYLOAD>::iterator::operator=(self_type const& that) -> self_type& {
   this->super_type::operator=(that);
   return *this;
 }
@@ -1792,7 +1809,7 @@ inline constexpr IPAddr::raw_addr_type::raw_addr_type() : _ip4(INADDR_ANY) {}
 
 inline IPAddr::IPAddr(in_addr_t addr) : _addr(addr), _family(AF_INET) {}
 
-inline IPAddr::IPAddr(in6_addr const& addr) :  _addr(addr), _family(AF_INET6) {}
+inline IPAddr::IPAddr(in6_addr const& addr) : _addr(addr), _family(AF_INET6) {}
 
 inline IPAddr::IPAddr(sockaddr const *addr) {
   this->assign(addr);
@@ -1955,7 +1972,7 @@ inline IPEndpoint::IPEndpoint(IPAddr const& addr) {
   this->assign(addr);
 }
 
-inline IPEndpoint::IPEndpoint(sockaddr const * sa) {
+inline IPEndpoint::IPEndpoint(sockaddr const *sa) {
   this->assign(sa);
 }
 
@@ -2472,7 +2489,7 @@ inline IPMask::raw_type IPNet::width() const { return _mask.width(); }
 
 inline IPMask const& IPNet::mask() const { return _mask; }
 
-inline IPRange IPNet::as_range() const { return {this->lower_bound(), this->upper_bound()};}
+inline IPRange IPNet::as_range() const { return {this->lower_bound(), this->upper_bound()}; }
 
 inline IPNet::self_type& IPNet::assign(IPAddr const& addr, IPMask const& mask) {
   _addr = addr & mask;
@@ -2488,19 +2505,19 @@ inline bool IPNet::operator!=(IPNet::self_type const& that) const {
   return _mask != that._mask || _addr != that._addr;
 }
 
-inline bool operator == (IPNet const& lhs, IP4Net const& rhs) {
+inline bool operator==(IPNet const& lhs, IP4Net const& rhs) {
   return lhs.is_ip4() && lhs.ip4() == rhs;
 }
 
-inline bool operator == (IP4Net const& lhs, IPNet const& rhs) {
+inline bool operator==(IP4Net const& lhs, IPNet const& rhs) {
   return rhs.is_ip4() && rhs.ip4() == lhs;
 }
 
-inline bool operator == (IPNet const& lhs, IP6Net const& rhs) {
+inline bool operator==(IPNet const& lhs, IP6Net const& rhs) {
   return lhs.is_ip6() && lhs.ip6() == rhs;
 }
 
-inline bool operator == (IP6Net const& lhs, IPNet const& rhs) {
+inline bool operator==(IP6Net const& lhs, IPNet const& rhs) {
   return rhs.is_ip6() && rhs.ip6() == lhs;
 }
 
@@ -2568,10 +2585,10 @@ inline bool IP6Range::NetSource::operator!=(IP6Range::NetSource::self_type const
 
 inline IPRange::NetSource::NetSource(IPRange::NetSource::range_type const& range) {
   if (range.is_ip4()) {
-    new (&_ip4) decltype(_ip4)(range.ip4());
+    new(&_ip4) decltype(_ip4)(range.ip4());
     _family = AF_INET;
   } else if (range.is_ip6()) {
-    new (&_ip6) decltype(_ip6)(range.ip6());
+    new(&_ip6) decltype(_ip6)(range.ip6());
     _family = AF_INET6;
   }
 }
@@ -2582,8 +2599,8 @@ inline auto IPRange::NetSource::begin() const -> iterator {
 
 inline auto IPRange::NetSource::end() const -> iterator {
   return AF_INET == _family ? self_type{IP4Range{}}
-  : AF_INET6 == _family ? self_type{IP6Range{}}
-  : self_type{IPRange{}};
+                            : AF_INET6 == _family ? self_type{IP6Range{}}
+                                                  : self_type{IPRange{}};
 }
 
 inline IPAddr IPRange::NetSource::addr() const {
@@ -2605,10 +2622,10 @@ inline IPMask IPRange::NetSource::mask() const {
 }
 
 inline IPNet IPRange::NetSource::operator*() const {
-  return { this->addr(), this->mask() };
+  return {this->addr(), this->mask()};
 }
 
-inline auto IPRange::NetSource::operator++() -> self_type & {
+inline auto IPRange::NetSource::operator++() -> self_type& {
   if (AF_INET == _family) {
     ++_ip4;
   } else if (AF_INET6 == _family) {
@@ -2688,7 +2705,7 @@ auto IPSpace<PAYLOAD>::end() const -> const_iterator {
   return const_iterator(nc_this->_ip4.end(), nc_this->_ip6.end());
 }
 
-} // namespace SWOC_NAMESPACE
+}} // namespace swoc
 
 namespace std {
 
@@ -2748,7 +2765,7 @@ public:
 
 } // namespace std
 
-namespace SWOC_NAMESPACE {
+namespace swoc { inline namespace SWOC_VERSION_NS {
 
 template<size_t IDX> typename std::tuple_element<IDX, IP4Net>::type
 get(swoc::IP4Net const& net) {
@@ -2777,4 +2794,4 @@ get(swoc::IPNet const& net) {
   }
 }
 
-} // namespace SWOC_NAMESPACE
+}} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/swoc_meta.h b/swoc++/include/swoc/swoc_meta.h
index cfbdd05..95d5ee3 100644
--- a/swoc++/include/swoc/swoc_meta.h
+++ b/swoc++/include/swoc/swoc_meta.h
@@ -11,182 +11,185 @@
 
 #include "swoc/swoc_version.h"
 
-namespace SWOC_NAMESPACE
-{
-namespace meta
-{
-  /** This creates an ordered series of meta template cases that can be used to select one of a set
-   * of functions in a priority ordering. A set of templated overloads take an (extra) argument of
-   * the case structures, each a different one. Calling the function invokes the highest case that
-   * is valid. Because of SFINAE the templates can have errors, as long as at least one doesn't.
-   * The root technique is to use @c decltype to check an expression for the overload to be valid.
-   * Because the compiler will evaluate everything it can while parsing the template this
-   * expression must be delayed until the template is instantiated. This is done by making the
-   * return type @c auto and making the @c decltype dependent on the template parameter. In
-   * addition, the comma operator can be used to force a specific return type while also checking
-   * the expression for validity. E.g.
-   *
-   * @code
-   * template <typename T> auto func(T && t, CaseTag<0>) -> decltype(t.item, int()) { }
-   * @endcode
-   *
-   * The comma operator discards the type and value of the left operand therefore the return type of
-   * the function is @c int but this overload will not be available if @c t.item does not compile
-   * (e.g., there is no such member). The presence of @c t.item also prevents this compilation check
-   * from happening until overload selection is needed. Therefore if the goal was a function that
-   * would return the value of the @c T::count member if present and 0 if not, the code would be
-   *
-   * @code
-   * template <typename T> auto Get_Count(T && t, CaseTag<0>)
-   *   -> int
-   * { return 0; }
-   * template <typename T> auto Get_Count(T && t, CaseTag<1>)
-   *   -> decltype(t.count, int())
-   * { return t.count; }
-   * int Get_Count(Thing& t) { return GetCount(t, CaseArg); }
-   * @endcode
-   *
-   * Note the overloads will be checked from the highest case to the lowest and the first one that
-   * is valid (via SFINAE) is used. This is the point of using the case arguments, to force an
-   * ordering on the overload selection. Unfortunately this means the functions @b must be
-   * templated, even if there's no other reason for it, because it depends on SFINAE which doesn't
-   * apply to normal overloads.
-   *
-   * The key point is the expression in the @c decltype should be the same expression used in the
-   * method to verify it will compile. It is annoying to type it twice but there's not a better
-   * option.
-   *
-   * Note @c decltype does not accept explicit types - to have the type of "int" an @c int must be
-   * constructed. This is easy for builtin types except @c void. @c CaseVoidFunc is provided for that
-   * situation, e.g. <tt>decltype(CaseVoidFunc())</tt> provides @c void via @c decltype.
-   */
+namespace swoc { inline namespace SWOC_VERSION_NS {
+namespace meta {
+/** This creates an ordered series of meta template cases that can be used to select one of a set
+ * of functions in a priority ordering. A set of templated overloads take an (extra) argument of
+ * the case structures, each a different one. Calling the function invokes the highest case that
+ * is valid. Because of SFINAE the templates can have errors, as long as at least one doesn't.
+ * The root technique is to use @c decltype to check an expression for the overload to be valid.
+ * Because the compiler will evaluate everything it can while parsing the template this
+ * expression must be delayed until the template is instantiated. This is done by making the
+ * return type @c auto and making the @c decltype dependent on the template parameter. In
+ * addition, the comma operator can be used to force a specific return type while also checking
+ * the expression for validity. E.g.
+ *
+ * @code
+ * template <typename T> auto func(T && t, CaseTag<0>) -> decltype(t.item, int()) { }
+ * @endcode
+ *
+ * The comma operator discards the type and value of the left operand therefore the return type of
+ * the function is @c int but this overload will not be available if @c t.item does not compile
+ * (e.g., there is no such member). The presence of @c t.item also prevents this compilation check
+ * from happening until overload selection is needed. Therefore if the goal was a function that
+ * would return the value of the @c T::count member if present and 0 if not, the code would be
+ *
+ * @code
+ * template <typename T> auto Get_Count(T && t, CaseTag<0>)
+ *   -> int
+ * { return 0; }
+ * template <typename T> auto Get_Count(T && t, CaseTag<1>)
+ *   -> decltype(t.count, int())
+ * { return t.count; }
+ * int Get_Count(Thing& t) { return GetCount(t, CaseArg); }
+ * @endcode
+ *
+ * Note the overloads will be checked from the highest case to the lowest and the first one that
+ * is valid (via SFINAE) is used. This is the point of using the case arguments, to force an
+ * ordering on the overload selection. Unfortunately this means the functions @b must be
+ * templated, even if there's no other reason for it, because it depends on SFINAE which doesn't
+ * apply to normal overloads.
+ *
+ * The key point is the expression in the @c decltype should be the same expression used in the
+ * method to verify it will compile. It is annoying to type it twice but there's not a better
+ * option.
+ *
+ * Note @c decltype does not accept explicit types - to have the type of "int" an @c int must be
+ * constructed. This is easy for builtin types except @c void. @c CaseVoidFunc is provided for that
+ * situation, e.g. <tt>decltype(CaseVoidFunc())</tt> provides @c void via @c decltype.
+ */
 
-  /// Case hierarchy.
-  template <unsigned N> struct CaseTag : /** @cond DOXYGEN_FAIL */ public CaseTag<N - 1> /** @endcond */ {
-    constexpr CaseTag() {}
-    static constexpr unsigned value = N;
-  };
-
-  /// Anchor the hierarchy.
-  template <> struct CaseTag<0> {
-    constexpr CaseTag() {}
-    static constexpr unsigned value = 0;
-  };
-
-  /** This is the final case - it forces the super class hierarchy.
-   * After defining the cases using the indexed case arguments, this is used to to perform the call.
-   * To increase the hierarchy depth, change the template argument to a larger number.
-   */
-  static constexpr CaseTag<9> CaseArg{};
+/// Case hierarchy.
+template<unsigned N>
+struct CaseTag : /** @cond DOXYGEN_FAIL */ public CaseTag<N - 1> /** @endcond */ {
+  constexpr CaseTag() {}
 
-  /** A typed function for use in @c decltype.
-   *
-   * @tparam T The desired type.
-   * @return @a T
-   *
-   * This function has no implementation. It should be used only inside @c decltype when a specific
-   * type (rather than the type of an expression) is needed. For a type @a T that has a expression
-   * default constructor this can be used.
-   *
-   * @code
-   * decltype(T())
-   * @endcode
-   *
-   * But if there is no default constructor this will not compile. This is a work around, so the
-   * previous expression would be
-   *
-   * @code
-   * decltype(meta::TypeFunc<T>())
-   * @endcode
-   *
-   * Note this can also be a problem for even built in types like @c unsigned @c long for which
-   * the expression
-   *
+  static constexpr unsigned value = N;
+};
+
+/// Anchor the hierarchy.
+template<> struct CaseTag<0> {
+  constexpr CaseTag() {}
+
+  static constexpr unsigned value = 0;
+};
+
+/** This is the final case - it forces the super class hierarchy.
+ * After defining the cases using the indexed case arguments, this is used to to perform the call.
+ * To increase the hierarchy depth, change the template argument to a larger number.
+ */
+static constexpr CaseTag<9> CaseArg{};
+
+/** A typed function for use in @c decltype.
+ *
+ * @tparam T The desired type.
+ * @return @a T
+ *
+ * This function has no implementation. It should be used only inside @c decltype when a specific
+ * type (rather than the type of an expression) is needed. For a type @a T that has a expression
+ * default constructor this can be used.
+ *
+ * @code
+ * decltype(T())
+ * @endcode
+ *
+ * But if there is no default constructor this will not compile. This is a work around, so the
+ * previous expression would be
+ *
+ * @code
+ * decltype(meta::TypeFunc<T>())
+ * @endcode
+ *
+ * Note this can also be a problem for even built in types like @c unsigned @c long for which
+ * the expression
+ *
+ * @code
+ * decltype(unsigned long())
+ * @endcode
+ *
+ * does not compile.
+ */
+template<typename T> T TypeFunc();
+
+/** Support for variable parameter lambdas.
+ *
+ * @tparam Args Lambdas to combine.
+ *
+ * This creates a class that has an overloaded function operator, with each overload corresponding
+ * to one of the provided lambdas. The original use case is with @c std::visit where this can be
+ * used to construct the @a visitor from a collection of lambdas.
+ *
+ * @code
+ * std::variant<int, bool> v;
+ * std::visit(swoc::meta::vary{
+ *   [] (int & i) { ... },
+ *   [] (bool & b) { ... }
+ *   }, v);
+ * @endcode
+ */
+template<typename... Args> struct vary : public Args ... {
+  using Args::operator()...;
+};
+/// Template argument deduction guide (C++17 required).
+template<typename... Args> vary(Args...)->vary<Args...>;
+
+/** Check if a type is any of a set of types.
+ *
+ * @tparam T Type to check.
+ * @tparam Types Type list to match against.
+ *
+ * @a value is @c true if @a T is the same as any of @a Types. This is commonly used with
+ * @c enable_if to enable a function / method only if the argument type is one of a fixed set.
+ * @code
+ *   template < typename T > auto f(T const& t)
+ *     -> std::enable_if_t<swoc::meta::is_any_of<T, int, float, bool>::value, void>
+ *   { ... }
+ */
+template<typename T, typename... Types> struct is_any_of {
+  static constexpr bool value = std::disjunction<std::is_same<T, Types>...>::value;
+};
+
+/** Type list support class.
+ *
+ * @tparam Types List of types.
+ *
+ * The examples for the nested meta functions presume a type list has been defined like
+ * @code
+ * using TL = swoc::meta::type_list<int, bool, float, double>;
+ * @endcode
+ */
+template<typename... Types> struct type_list {
+  /// Length of the type list.
+  static constexpr size_t size = sizeof...(Types);
+
+  /** Define a type using the types in the list.
+   * Give a type list, defining a variant that has those types would be
    * @code
-   * decltype(unsigned long())
+   * using v = TL::template apply<std::variant>;
    * @endcode
    *
-   * does not compile.
-   */
-  template <typename T> T TypeFunc();
-
-  /** Support for variable parameter lambdas.
-   *
-   * @tparam Args Lambdas to combine.
+   * The primary reason to do this is if the type list is needed elsewhere (e.g. to enable
+   * methods only for variant types).
    *
-   * This creates a class that has an overloaded function operator, with each overload corresponding
-   * to one of the provided lambdas. The original use case is with @c std::visit where this can be
-   * used to construct the @a visitor from a collection of lambdas.
-   *
-   * @code
-   * std::variant<int, bool> v;
-   * std::visit(swoc::meta::vary{
-   *   [] (int & i) { ... },
-   *   [] (bool & b) { ... }
-   *   }, v);
-   * @endcode
+   * @see contains
    */
-  template <typename... Args> struct vary : public Args... { using Args::operator()...; };
-  /// Template argument deduction guide (C++17 required).
-  template <typename... Args> vary(Args...)->vary<Args...>;
+  template<template<typename... Pack> typename T> using apply = T<Types...>;
 
-  /** Check if a type is any of a set of types.
+  /** Determine if a type @a T is a member of the type list.
    *
    * @tparam T Type to check.
-   * @tparam Types Type list to match against.
-   *
-   * @a value is @c true if @a T is the same as any of @a Types. This is commonly used with
-   * @c enable_if to enable a function / method only if the argument type is one of a fixed set.
-   * @code
-   *   template < typename T > auto f(T const& t)
-   *     -> std::enable_if_t<swoc::meta::is_any_of<T, int, float, bool>::value, void>
-   *   { ... }
-   */
-  template <typename T, typename... Types> struct is_any_of {
-    static constexpr bool value = std::disjunction<std::is_same<T, Types>...>::value;
-  };
-
-  /** Type list support class.
    *
-   * @tparam Types List of types.
+   * Frequently used with @c enable_if. This is handy for variants, if the list of variant
+   * types is encoded in the type list.
    *
-   * The examples for the nested meta functions presume a type list has been defined like
    * @code
-   * using TL = swoc::meta::type_list<int, bool, float, double>;
+   * template < typename T > auto f(T const& t)
+   *   -> std::enable_if_t<TL::template contains<T>::value, void>
+   * { ... }
    * @endcode
    */
-  template <typename... Types> struct type_list {
-    /// Length of the type list.
-    static constexpr size_t size = sizeof...(Types);
-
-    /** Define a type using the types in the list.
-     * Give a type list, defining a variant that has those types would be
-     * @code
-     * using v = TL::template apply<std::variant>;
-     * @endcode
-     *
-     * The primary reason to do this is if the type list is needed elsewhere (e.g. to enable
-     * methods only for variant types).
-     *
-     * @see contains
-     */
-    template <template <typename... Pack> typename T> using apply = T<Types...>;
-
-    /** Determine if a type @a T is a member of the type list.
-     *
-     * @tparam T Type to check.
-     *
-     * Frequently used with @c enable_if. This is handy for variants, if the list of variant
-     * types is encoded in the type list.
-     *
-     * @code
-     * template < typename T > auto f(T const& t)
-     *   -> std::enable_if_t<TL::template contains<T>::value, void>
-     * { ... }
-     * @endcode
-     */
-    template <typename T> static constexpr bool contains = is_any_of<T, Types...>::value;
-  };
+  template<typename T> static constexpr bool contains = is_any_of<T, Types...>::value;
+};
 
 } // namespace meta
-} // namespace SWOC_NAMESPACE
+}} // namespace SWOC_NAMESPACE
diff --git a/swoc++/include/swoc/swoc_version.h b/swoc++/include/swoc/swoc_version.h
index 03a87ea..11751e2 100644
--- a/swoc++/include/swoc/swoc_version.h
+++ b/swoc++/include/swoc/swoc_version.h
@@ -21,15 +21,12 @@
 
 #pragma once
 
-#if !defined(SWOC_NAMESPACE)
-#  define SWOC_NAMESPACE swoc_1_2_0
+#if !defined(SWOC_VERSION_NS)
+#  define SWOC_VERSION_NS _1_2_0
 #endif
 
-namespace SWOC_NAMESPACE
-{
+namespace swoc { inline namespace SWOC_VERSION_NS {
 static constexpr unsigned MAJOR_VERSION = 1;
 static constexpr unsigned MINOR_VERSION = 2;
 static constexpr unsigned POINT_VERSION = 0;
-} // namespace SWOC_NAMESPACE
-
-namespace swoc = SWOC_NAMESPACE;
+}} // namespace SWOC_VERSION_NS
diff --git a/swoc++/src/ArenaWriter.cc b/swoc++/src/ArenaWriter.cc
index e94cd21..ccfe0eb 100644
--- a/swoc++/src/ArenaWriter.cc
+++ b/swoc++/src/ArenaWriter.cc
@@ -6,8 +6,8 @@
 
 #include "swoc/ArenaWriter.h"
 
-namespace SWOC_NAMESPACE
-{
+namespace swoc { inline namespace SWOC_VERSION_NS {
+
 ArenaWriter &
 ArenaWriter::write(char c)
 {
@@ -48,4 +48,4 @@ ArenaWriter::realloc(size_t n)
   memcpy(_buffer, text.data(), text.size());
 }
 
-} // namespace SWOC_NAMESPACE
+}} // namespace SWOC_NAMESPACE
diff --git a/swoc++/src/Errata.cc b/swoc++/src/Errata.cc
index 2bf2660..4089f5b 100644
--- a/swoc++/src/Errata.cc
+++ b/swoc++/src/Errata.cc
@@ -15,15 +15,13 @@
 using swoc::MemArena;
 using std::string_view;
 using namespace std::literals;
-using namespace SWOC_NAMESPACE::literals;
+using namespace swoc::literals;
 
-namespace SWOC_NAMESPACE
-{
+namespace swoc { inline namespace SWOC_VERSION_NS {
 /** List of sinks for abandoned erratum.
  */
-namespace
-{
-  std::vector<Errata::Sink::Handle> Sink_List;
+namespace {
+std::vector<Errata::Sink::Handle> Sink_List;
 }
 
 std::string_view const Errata::DEFAULT_GLUE{"\n", 1};
@@ -33,8 +31,7 @@ std::string_view const Errata::DEFAULT_GLUE{"\n", 1};
     It holds the actual messages and is treated as a passive data object with nice constructors.
 */
 string_view
-Errata::Data::localize(string_view src)
-{
+Errata::Data::localize(string_view src) {
   auto span = _arena.alloc(src.size());
   memcpy(span.data(), src.data(), src.size());
   return span.view();
@@ -43,18 +40,16 @@ Errata::Data::localize(string_view src)
 /* ----------------------------------------------------------------------- */
 // methods for Errata
 
-Errata::~Errata()
-{
+Errata::~Errata() {
   this->release();
 }
 
 void
-Errata::release()
-{
+Errata::release() {
   if (_data) {
     if (--(_data->_ref_count) == 0) {
       if (!_data->empty()) {
-        for (auto &f : Sink_List) {
+        for (auto& f : Sink_List) {
           (*f)(*this);
         }
       }
@@ -65,8 +60,7 @@ Errata::release()
 }
 
 const Errata::Data *
-Errata::data()
-{
+Errata::data() {
   if (!_data) {
     MemArena arena{512};
     _data = arena.make<Data>(std::move(arena));
@@ -76,8 +70,7 @@ Errata::data()
 }
 
 Errata::Data *
-Errata::writeable_data()
-{
+Errata::writeable_data() {
   if (!_data) {
     this->data(); // force data existence, must be unique.
   } else if (_data->_ref_count > 1) {
@@ -90,74 +83,64 @@ Errata::writeable_data()
 }
 
 Errata::iterator
-Errata::begin()
-{
+Errata::begin() {
   return _data ? _data->_notes.begin() : iterator();
 }
 
 Errata::const_iterator
-Errata::begin() const
-{
+Errata::begin() const {
   return _data ? _data->_notes.begin() : const_iterator();
 }
 
 Errata::iterator
-Errata::end()
-{
+Errata::end() {
   return _data ? _data->_notes.end() : iterator();
 }
 
 Errata::const_iterator
-Errata::end() const
-{
+Errata::end() const {
   return _data ? _data->_notes.end() : const_iterator();
 }
 
 Severity
-Errata::severity() const
-{
+Errata::severity() const {
   return _data ? _data->_severity : DEFAULT_SEVERITY;
 }
 
-Errata &
-Errata::note(Severity severity, std::string_view text)
-{
-  auto d        = this->writeable_data();
+Errata&
+Errata::note(Severity severity, std::string_view text) {
+  auto d = this->writeable_data();
   Annotation *n = d->_arena.make<Annotation>(severity, d->localize(text));
   d->_notes.prepend(n);
   _data->_severity = std::max(_data->_severity, severity);
   return *this;
 }
 
-Errata &
-Errata::note_localized(Severity severity, std::string_view const &text)
-{
-  auto d        = this->writeable_data();
+Errata&
+Errata::note_localized(Severity severity, std::string_view const& text) {
+  auto d = this->writeable_data();
   Annotation *n = d->_arena.make<Annotation>(severity, text);
-  n->_level     = d->_level;
+  n->_level = d->_level;
   d->_notes.prepend(n);
   _data->_severity = std::max(_data->_severity, severity);
   return *this;
 }
 
 MemSpan<char>
-Errata::alloc(size_t n)
-{
+Errata::alloc(size_t n) {
   return this->writeable_data()->_arena.alloc(n).rebind<char>();
 }
 
-Errata &
-Errata::note(const self_type &that)
-{
-  for (auto const &m : that) {
+Errata&
+Errata::note(const self_type& that) {
+  for (auto const& m : that) {
     this->note(m._severity, m._text);
   }
   return *this;
 }
 
-Errata &
-Errata::clear()
-{
+Errata&
+Errata::clear() {
   if (_data) {
     _data->_notes.clear(); // Prevent sink processing.
     this->release();
@@ -166,16 +149,14 @@ Errata::clear()
 }
 
 void
-Errata::register_sink(Sink::Handle const &s)
-{
+Errata::register_sink(Sink::Handle const& s) {
   Sink_List.push_back(s);
 }
 
-std::ostream &
-Errata::write(std::ostream &out) const
-{
+std::ostream&
+Errata::write(std::ostream& out) const {
   string_view lead;
-  for (auto &m : *this) {
+  for (auto& m : *this) {
     out << lead << " [" << static_cast<int>(m._severity) << "]: " << m._text << std::endl;
     if (0 == lead.size()) {
       lead = "  "_sv;
@@ -184,26 +165,24 @@ Errata::write(std::ostream &out) const
   return out;
 }
 
-BufferWriter &
-bwformat(BufferWriter &bw, bwf::Spec const &spec, Errata::Severity level)
-{
-  static constexpr std::string_view name[] = {"DIAG", "DEBUG", "INFO", "NOTE", "WARNING", "ERROR", "FATAL", "ALERT", "EMERGENCY"};
+BufferWriter&
+bwformat(BufferWriter& bw, bwf::Spec const& spec, Errata::Severity level) {
+  static constexpr std::string_view name[] = {"DIAG", "DEBUG", "INFO", "NOTE", "WARNING", "ERROR"
+                                              , "FATAL", "ALERT", "EMERGENCY"};
   return bwformat(bw, spec, name[static_cast<int>(level)]);
 }
 
-BufferWriter &
-bwformat(BufferWriter &bw, bwf::Spec const &spec, Errata const &errata)
-{
-  for (auto &m : errata) {
+BufferWriter&
+bwformat(BufferWriter& bw, bwf::Spec const& spec, Errata const& errata) {
+  for (auto& m : errata) {
     bw.print("{}[{}] {}\n", swoc::bwf::Pattern{int(m.level()), "  "}, m.severity(), m.text());
   }
   return bw;
 }
 
-std::ostream &
-operator<<(std::ostream &os, Errata const &err)
-{
+std::ostream&
+operator<<(std::ostream& os, Errata const& err) {
   return err.write(os);
 }
 
-} // namespace SWOC_NAMESPACE
+}} // namespace SWOC_NAMESPACE
diff --git a/swoc++/src/MemArena.cc b/swoc++/src/MemArena.cc
index 1e16763..dd23fca 100644
--- a/swoc++/src/MemArena.cc
+++ b/swoc++/src/MemArena.cc
@@ -8,41 +8,34 @@
 #include <algorithm>
 #include "swoc/MemArena.h"
 
-using namespace SWOC_NAMESPACE;
+namespace swoc { inline namespace SWOC_VERSION_NS {
 
 void
-MemArena::Block::operator delete(void *ptr)
-{
+MemArena::Block::operator delete(void *ptr) {
   ::free(ptr);
 }
 
 // Need to break these out because the default implementation doesn't clear the
 // integral values in @a that.
 
-MemArena::MemArena(swoc::MemArena::self_type &&that)
-  : _active_allocated(that._active_allocated),
-    _active_reserved(that._active_reserved),
-    _frozen_allocated(that._frozen_allocated),
-    _frozen_reserved(that._frozen_reserved),
-    _reserve_hint(that._reserve_hint),
-    _frozen(std::move(that._frozen)),
-    _active(std::move(that._active))
-{
+MemArena::MemArena(swoc::MemArena::self_type&& that)
+    : _active_allocated(that._active_allocated), _active_reserved(that._active_reserved)
+      , _frozen_allocated(that._frozen_allocated), _frozen_reserved(that._frozen_reserved)
+      , _reserve_hint(that._reserve_hint), _frozen(std::move(that._frozen))
+      , _active(std::move(that._active)) {
   that._active_allocated = that._active_reserved = 0;
   that._frozen_allocated = that._frozen_reserved = 0;
-  that._reserve_hint                             = 0;
+  that._reserve_hint = 0;
 }
 
 MemArena *
-MemArena::construct_self_contained(size_t n)
-{
+MemArena::construct_self_contained(size_t n) {
   MemArena tmp;
   return tmp.make<MemArena>(std::move(tmp));
 }
 
-MemArena &
-MemArena::operator=(swoc::MemArena::self_type &&that)
-{
+MemArena&
+MemArena::operator=(swoc::MemArena::self_type&& that) {
   this->clear();
   std::swap(_active_allocated, that._active_allocated);
   std::swap(_active_reserved, that._active_reserved);
@@ -55,8 +48,7 @@ MemArena::operator=(swoc::MemArena::self_type &&that)
 }
 
 MemArena::Block *
-MemArena::make_block(size_t n)
-{
+MemArena::make_block(size_t n) {
   // If there's no reservation hint, use the extent. This is transient because the hint is cleared.
   if (_reserve_hint == 0) {
     if (_active_reserved) {
@@ -67,7 +59,7 @@ MemArena::make_block(size_t n)
   }
 
   // If post-freeze or reserved, allocate at least that much.
-  n             = std::max<size_t>(n, _reserve_hint);
+  n = std::max<size_t>(n, _reserve_hint);
   _reserve_hint = 0; // did this, clear for next time.
   // Add in overhead and round up to paragraph units.
   n = Paragraph{round_up(n + ALLOC_HEADER_SIZE + sizeof(Block))};
@@ -81,16 +73,15 @@ MemArena::make_block(size_t n)
   // Easier to use malloc and override @c delete.
   auto free_space = n - sizeof(Block);
   _active_reserved += free_space;
-  return new (::malloc(n)) Block(free_space);
+  return new(::malloc(n)) Block(free_space);
 }
 
 MemSpan<void>
-MemArena::alloc(size_t n)
-{
+MemArena::alloc(size_t n) {
   MemSpan<void> zret;
   this->require(n);
   auto block = _active.head();
-  zret       = block->alloc(n);
+  zret = block->alloc(n);
   _active_allocated += n;
   // If this block is now full, move it to the back.
   if (block->is_full() && block != _active.tail()) {
@@ -100,41 +91,38 @@ MemArena::alloc(size_t n)
   return zret;
 }
 
-MemArena &
-MemArena::freeze(size_t n)
-{
+MemArena&
+MemArena::freeze(size_t n) {
   this->destroy_frozen();
   _frozen = std::move(_active);
   // Update the meta data.
   _frozen_allocated = _active_allocated;
   _active_allocated = 0;
-  _frozen_reserved  = _active_reserved;
-  _active_reserved  = 0;
+  _frozen_reserved = _active_reserved;
+  _active_reserved = 0;
 
   _reserve_hint = n;
 
   return *this;
 }
 
-MemArena &
-MemArena::thaw()
-{
+MemArena&
+MemArena::thaw() {
   this->destroy_frozen();
   _frozen_reserved = _frozen_allocated = 0;
   return *this;
 }
 
 bool
-MemArena::contains(const void *ptr) const
-{
-  auto pred = [ptr](const Block &b) -> bool { return b.contains(ptr); };
+MemArena::contains(const void *ptr) const {
+  auto pred = [ptr](const Block& b) -> bool { return b.contains(ptr); };
 
-  return std::any_of(_active.begin(), _active.end(), pred) || std::any_of(_frozen.begin(), _frozen.end(), pred);
+  return std::any_of(_active.begin(), _active.end(), pred) ||
+         std::any_of(_frozen.begin(), _frozen.end(), pred);
 }
 
-MemArena &
-MemArena::require(size_t n)
-{
+MemArena&
+MemArena::require(size_t n) {
   auto spot = _active.begin();
   Block *block{nullptr};
 
@@ -163,21 +151,18 @@ MemArena::require(size_t n)
 }
 
 void
-MemArena::destroy_active()
-{
+MemArena::destroy_active() {
   _active.apply([](Block *b) { delete b; }).clear();
 }
 
 void
-MemArena::destroy_frozen()
-{
+MemArena::destroy_frozen() {
   _frozen.apply([](Block *b) { delete b; }).clear();
 }
 
-MemArena &
-MemArena::clear(size_t hint)
-{
-  _reserve_hint    = hint ? hint : _frozen_allocated + _active_allocated;
+MemArena&
+MemArena::clear(size_t hint) {
+  _reserve_hint = hint ? hint : _frozen_allocated + _active_allocated;
   _frozen_reserved = _frozen_allocated = 0;
   _active_reserved = _active_allocated = 0;
   this->destroy_frozen();
@@ -186,19 +171,17 @@ MemArena::clear(size_t hint)
   return *this;
 }
 
-MemArena &
-MemArena::discard(size_t hint)
-{
+MemArena&
+MemArena::discard(size_t hint) {
   _reserve_hint = hint ? hint : _frozen_allocated + _active_allocated;
-  for (auto &block : _active) {
+  for (auto& block : _active) {
     block.discard();
   }
   _active_allocated = 0;
   return *this;
 }
 
-MemArena::~MemArena()
-{
+MemArena::~MemArena() {
   // Destruct in a way that makes it safe for the instance to be in one of its own memory blocks.
   Block *ba = _active.head();
   Block *bf = _frozen.head();
@@ -206,12 +189,14 @@ MemArena::~MemArena()
   _frozen.clear();
   while (bf) {
     Block *b = bf;
-    bf       = bf->_link._next;
+    bf = bf->_link._next;
     delete b;
   }
   while (ba) {
     Block *b = ba;
-    ba       = ba->_link._next;
+    ba = ba->_link._next;
     delete b;
   }
 }
+
+}} // namespace swoc
diff --git a/swoc++/src/RBTree.cc b/swoc++/src/RBTree.cc
index 7e96486..515f825 100644
--- a/swoc++/src/RBTree.cc
+++ b/swoc++/src/RBTree.cc
@@ -7,311 +7,300 @@
 
 #include "swoc/RBTree.h"
 
-namespace SWOC_NAMESPACE
-{
-namespace detail
-{
-  // These equality operators are only used in this file.
-
-  /// Equality.
-  /// @note If @a n is @c NULL it is treated as having the color @c BLACK.
-  /// @return @c true if @a c and the color of @a n are the same.
-  inline bool
-  operator==(RBNode *n, RBNode::Color c)
-  {
-    return c == (n ? n->color() : RBNode::Color::BLACK);
-  }
-  /// Equality.
-  /// @note If @a n is @c NULL it is treated as having the color @c BLACK.
-  /// @return @c true if @a c and the color of @a n are the same.
-  inline bool
-  operator==(RBNode::Color c, RBNode *n)
-  {
-    return n == c;
+namespace swoc { inline namespace SWOC_VERSION_NS {
+namespace detail {
+// These equality operators are only used in this file.
+
+/// Equality.
+/// @note If @a n is @c NULL it is treated as having the color @c BLACK.
+/// @return @c true if @a c and the color of @a n are the same.
+inline bool
+operator==(RBNode *n, RBNode::Color c) {
+  return c == (n ? n->color() : RBNode::Color::BLACK);
+}
+
+/// Equality.
+/// @note If @a n is @c NULL it is treated as having the color @c BLACK.
+/// @return @c true if @a c and the color of @a n are the same.
+inline bool
+operator==(RBNode::Color c, RBNode *n) {
+  return n == c;
+}
+
+RBNode *
+RBNode::child_at(Direction d) const {
+  return d == Direction::RIGHT ? _right : d == Direction::LEFT ? _left : nullptr;
+}
+
+RBNode *
+RBNode::rotate(Direction dir) {
+  self_type *parent = _parent; // Cache because it can change before we use it.
+  Direction child_dir = _parent ? _parent->direction_of(this) : Direction::NONE;
+  Direction other_dir = this->flip(dir);
+  self_type *child = this;
+
+  if (dir != Direction::NONE && this->child_at(other_dir)) {
+    child = this->child_at(other_dir);
+    this->clear_child(other_dir);
+    this->set_child(child->child_at(dir), other_dir);
+    child->clear_child(dir);
+    child->set_child(this, dir);
+    child->structure_fixup();
+    this->structure_fixup();
+    if (parent) {
+      parent->clear_child(child_dir);
+      parent->set_child(child, child_dir);
+    } else {
+      child->_parent = nullptr;
+    }
   }
+  return child;
+}
 
-  RBNode *
-  RBNode::child_at(Direction d) const
-  {
-    return d == Direction::RIGHT ? _right : d == Direction::LEFT ? _left : nullptr;
+RBNode *
+RBNode::set_child(self_type *child, Direction dir) {
+  if (child) {
+    child->_parent = this;
   }
-
-  RBNode *
-  RBNode::rotate(Direction dir)
-  {
-    self_type *parent   = _parent; // Cache because it can change before we use it.
-    Direction child_dir = _parent ? _parent->direction_of(this) : Direction::NONE;
-    Direction other_dir = this->flip(dir);
-    self_type *child    = this;
-
-    if (dir != Direction::NONE && this->child_at(other_dir)) {
-      child = this->child_at(other_dir);
-      this->clear_child(other_dir);
-      this->set_child(child->child_at(dir), other_dir);
-      child->clear_child(dir);
-      child->set_child(this, dir);
-      child->structure_fixup();
-      this->structure_fixup();
-      if (parent) {
-        parent->clear_child(child_dir);
-        parent->set_child(child, child_dir);
-      } else {
-        child->_parent = nullptr;
-      }
-    }
-    return child;
+  if (dir == Direction::RIGHT) {
+    _right = child;
+  } else if (dir == Direction::LEFT) {
+    _left = child;
   }
-
-  RBNode *
-  RBNode::set_child(self_type *child, Direction dir)
-  {
-    if (child) {
-      child->_parent = this;
-    }
-    if (dir == Direction::RIGHT) {
-      _right = child;
-    } else if (dir == Direction::LEFT) {
-      _left = child;
-    }
-    return child;
+  return child;
+}
+
+RBNode *
+RBNode::ripple_structure_fixup() {
+  self_type *root = this; // last node seen, root node at the end
+  self_type *p = this;
+  while (p) {
+    p->structure_fixup();
+    root = p;
+    p = root->_parent;
   }
-
-  RBNode *
... 2532 lines suppressed ...


(trafficserver-libswoc) 04/04: More style tweaks.

Posted by bn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bneradt pushed a commit to branch dev-1-2-0
in repository https://gitbox.apache.org/repos/asf/trafficserver-libswoc.git

commit 8b3f9529f55a386b03fdb715daecfeb67e22a903
Author: Alan M. Carroll <am...@apache.org>
AuthorDate: Sat Apr 4 09:49:56 2020 -0500

    More style tweaks.
---
 swoc++/include/swoc/ArenaWriter.h      |  2 +-
 swoc++/include/swoc/BufferWriter.h     |  2 +-
 swoc++/include/swoc/DiscreteRange.h    |  2 +-
 swoc++/include/swoc/Errata.h           |  2 +-
 swoc++/include/swoc/IntrusiveDList.h   |  2 +-
 swoc++/include/swoc/IntrusiveHashMap.h |  2 +-
 swoc++/include/swoc/MemArena.h         |  2 +-
 swoc++/include/swoc/MemSpan.h          |  2 +-
 swoc++/include/swoc/RBTree.h           |  2 +-
 swoc++/include/swoc/Scalar.h           |  2 +-
 swoc++/include/swoc/TextView.h         |  2 +-
 swoc++/include/swoc/bwf_base.h         |  2 +-
 swoc++/include/swoc/bwf_ex.h           |  2 +-
 swoc++/include/swoc/swoc_ip.h          |  2 +-
 swoc++/include/swoc/swoc_meta.h        |  2 +-
 swoc++/src/ArenaWriter.cc              |  2 +-
 swoc++/src/Errata.cc                   |  2 +-
 swoc++/src/RBTree.cc                   |  2 +-
 swoc++/src/TextView.cc                 | 92 +++++++++++++++++-----------------
 swoc++/src/bw_format.cc                | 19 ++-----
 swoc++/src/bw_ip_format.cc             | 17 +------
 swoc++/src/swoc_file.cc                | 17 +------
 swoc++/src/swoc_ip.cc                  |  2 +-
 23 files changed, 71 insertions(+), 112 deletions(-)

diff --git a/swoc++/include/swoc/ArenaWriter.h b/swoc++/include/swoc/ArenaWriter.h
index 49df69e..81d5d3e 100644
--- a/swoc++/include/swoc/ArenaWriter.h
+++ b/swoc++/include/swoc/ArenaWriter.h
@@ -61,4 +61,4 @@ protected:
 inline swoc::ArenaWriter::ArenaWriter(swoc::MemArena& arena)
     : super_type(arena.remnant()), _arena(arena) {}
 
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
diff --git a/swoc++/include/swoc/BufferWriter.h b/swoc++/include/swoc/BufferWriter.h
index b256884..ed22f46 100644
--- a/swoc++/include/swoc/BufferWriter.h
+++ b/swoc++/include/swoc/BufferWriter.h
@@ -626,7 +626,7 @@ inline FixedBufferWriter::operator std::string_view() const {
 // --- LocalBufferWriter ---
 template<size_t N> LocalBufferWriter<N>::LocalBufferWriter() : super_type(_arr, N) {}
 
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
 
 namespace std
 {
diff --git a/swoc++/include/swoc/DiscreteRange.h b/swoc++/include/swoc/DiscreteRange.h
index cb9f976..80da09c 100644
--- a/swoc++/include/swoc/DiscreteRange.h
+++ b/swoc++/include/swoc/DiscreteRange.h
@@ -1409,4 +1409,4 @@ DiscreteSpace<METRIC, PAYLOAD>::blend(DiscreteSpace::range_type const& range, U
   return *this;
 }
 
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
diff --git a/swoc++/include/swoc/Errata.h b/swoc++/include/swoc/Errata.h
index 261cbff..1c2443e 100644
--- a/swoc++/include/swoc/Errata.h
+++ b/swoc++/include/swoc/Errata.h
@@ -859,7 +859,7 @@ BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, Errata::Annotatio
 
 BufferWriter &bwformat(BufferWriter &w, bwf::Spec const &spec, Errata const &);
 
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
 
 // Tuple / structured binding support.
 namespace std
diff --git a/swoc++/include/swoc/IntrusiveDList.h b/swoc++/include/swoc/IntrusiveDList.h
index 132b61c..eca4cf8 100644
--- a/swoc++/include/swoc/IntrusiveDList.h
+++ b/swoc++/include/swoc/IntrusiveDList.h
@@ -886,4 +886,4 @@ IntrusiveDList<L>::apply(F&& f) -> self_type& {
   return detail::Intrusive_DList_Apply(*this, f);
 };
 
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
diff --git a/swoc++/include/swoc/IntrusiveHashMap.h b/swoc++/include/swoc/IntrusiveHashMap.h
index 532e556..fed69f9 100644
--- a/swoc++/include/swoc/IntrusiveHashMap.h
+++ b/swoc++/include/swoc/IntrusiveHashMap.h
@@ -682,4 +682,4 @@ IntrusiveHashMap<H>::get_expansion_limit() const {
   return _expansion_limit;
 }
 
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
diff --git a/swoc++/include/swoc/MemArena.h b/swoc++/include/swoc/MemArena.h
index 51f76fd..289d2fe 100644
--- a/swoc++/include/swoc/MemArena.h
+++ b/swoc++/include/swoc/MemArena.h
@@ -485,4 +485,4 @@ void FixedArena<T>::clear() {
   _list._next = nullptr;
 }
 
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
diff --git a/swoc++/include/swoc/MemSpan.h b/swoc++/include/swoc/MemSpan.h
index cd45d6c..c94c2d2 100644
--- a/swoc++/include/swoc/MemSpan.h
+++ b/swoc++/include/swoc/MemSpan.h
@@ -915,7 +915,7 @@ MemSpan<void>::view() const {
   return {static_cast<char const *>(_ptr), _size};
 }
 
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
 
 /// @cond NO_DOXYGEN
 // STL tuple support - this allows the @c MemSpan to be used as a tuple of a pointer
diff --git a/swoc++/include/swoc/RBTree.h b/swoc++/include/swoc/RBTree.h
index 2150bb5..133238b 100644
--- a/swoc++/include/swoc/RBTree.h
+++ b/swoc++/include/swoc/RBTree.h
@@ -221,4 +221,4 @@ RBNode::structure_validate() {
 }
 
 } // namespace detail
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
diff --git a/swoc++/include/swoc/Scalar.h b/swoc++/include/swoc/Scalar.h
index 5e6cc88..f3cb3bd 100644
--- a/swoc++/include/swoc/Scalar.h
+++ b/swoc++/include/swoc/Scalar.h
@@ -993,7 +993,7 @@ tag_label(std::ostream& w) {
   return w;
 }
 } // namespace detail
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
 
 namespace std
 {
diff --git a/swoc++/include/swoc/TextView.h b/swoc++/include/swoc/TextView.h
index 23072bc..34a04f5 100644
--- a/swoc++/include/swoc/TextView.h
+++ b/swoc++/include/swoc/TextView.h
@@ -1644,7 +1644,7 @@ namespace literals
   constexpr swoc::TextView operator"" _tv(const char *s, size_t n) { return {s, n}; }
 } // namespace literals
 
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
 
 namespace std {
 /// Write the contents of @a view to the stream @a os.
diff --git a/swoc++/include/swoc/bwf_base.h b/swoc++/include/swoc/bwf_base.h
index 0263ee2..046c2ce 100644
--- a/swoc++/include/swoc/bwf_base.h
+++ b/swoc++/include/swoc/bwf_base.h
@@ -1198,4 +1198,4 @@ As_Hex(T const& t) {
 
 BufferWriter& bwformat(BufferWriter& w, bwf::Spec const& spec, bwf::HexDump const& hex);
 
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
diff --git a/swoc++/include/swoc/bwf_ex.h b/swoc++/include/swoc/bwf_ex.h
index 1e59a4a..b843b35 100644
--- a/swoc++/include/swoc/bwf_ex.h
+++ b/swoc++/include/swoc/bwf_ex.h
@@ -210,4 +210,4 @@ bwformat(BufferWriter& w, bwf::Spec const& spec, bwf::SubText<Args...> const& su
   return w;
 }
 
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
diff --git a/swoc++/include/swoc/swoc_ip.h b/swoc++/include/swoc/swoc_ip.h
index 7001b89..203a32b 100644
--- a/swoc++/include/swoc/swoc_ip.h
+++ b/swoc++/include/swoc/swoc_ip.h
@@ -2794,4 +2794,4 @@ get(swoc::IPNet const& net) {
   }
 }
 
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
diff --git a/swoc++/include/swoc/swoc_meta.h b/swoc++/include/swoc/swoc_meta.h
index 95d5ee3..38d0889 100644
--- a/swoc++/include/swoc/swoc_meta.h
+++ b/swoc++/include/swoc/swoc_meta.h
@@ -192,4 +192,4 @@ template<typename... Types> struct type_list {
 };
 
 } // namespace meta
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
diff --git a/swoc++/src/ArenaWriter.cc b/swoc++/src/ArenaWriter.cc
index ccfe0eb..b5a60a8 100644
--- a/swoc++/src/ArenaWriter.cc
+++ b/swoc++/src/ArenaWriter.cc
@@ -48,4 +48,4 @@ ArenaWriter::realloc(size_t n)
   memcpy(_buffer, text.data(), text.size());
 }
 
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
diff --git a/swoc++/src/Errata.cc b/swoc++/src/Errata.cc
index 4089f5b..2d8b9fe 100644
--- a/swoc++/src/Errata.cc
+++ b/swoc++/src/Errata.cc
@@ -185,4 +185,4 @@ operator<<(std::ostream& os, Errata const& err) {
   return err.write(os);
 }
 
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
diff --git a/swoc++/src/RBTree.cc b/swoc++/src/RBTree.cc
index 515f825..504206a 100644
--- a/swoc++/src/RBTree.cc
+++ b/swoc++/src/RBTree.cc
@@ -350,4 +350,4 @@ RBNode::left_most_descendant() const -> self_type * {
 }
 
 } // namespace detail
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
diff --git a/swoc++/src/TextView.cc b/swoc++/src/TextView.cc
index 6459712..7f1e5e7 100644
--- a/swoc++/src/TextView.cc
+++ b/swoc++/src/TextView.cc
@@ -54,39 +54,40 @@ strcasecmp(const std::string_view &lhs, const std::string_view &rhs)
   return r ? r : zret;
 }
 
+namespace swoc { inline namespace SWOC_VERSION_NS {
+
 /// @cond INTERNAL_DETAIL
-const int8_t swoc::svtoi_convert[256] = {
-  /* [can't do this nicely because clang format won't allow exdented comments]
-   0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
-  */
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 00
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 20
-  0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  -1, -1, -1, -1, -1, -1, // 30
-  -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // 40
-  25, 26, 27, 28, 20, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, // 50
-  -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // 60
-  25, 26, 27, 28, 20, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, // 70
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 80
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 90
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // A0
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // B0
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // C0
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // D0
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // E0
-  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // F0
+const int8_t svtoi_convert[256] = {
+    /* [can't do this nicely because clang format won't allow exdented comments]
+     0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
+    */
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 00
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 20
+    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, // 30
+    -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // 40
+    25, 26, 27, 28, 20, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, // 50
+    -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // 60
+    25, 26, 27, 28, 20, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, // 70
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 80
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 90
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // A0
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // B0
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // C0
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // D0
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // E0
+    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // F0
 };
 /// @endcond
 
 intmax_t
-swoc::svtoi(TextView src, TextView *out, int base)
-{
+svtoi(TextView src, TextView *out, int base) {
   intmax_t zret = 0;
 
   if (src.ltrim_if(&isspace) && src) {
     TextView parsed;
     const char *start = src.data();
-    bool neg          = false;
+    bool neg = false;
     if ('-' == *src) {
       ++src;
       neg = true;
@@ -107,8 +108,7 @@ swoc::svtoi(TextView src, TextView *out, int base)
 }
 
 uintmax_t
-swoc::svtou(TextView src, TextView *out, int base)
-{
+svtou(TextView src, TextView *out, int base) {
   uintmax_t zret = 0;
 
   if (out) {
@@ -135,26 +135,24 @@ swoc::svtou(TextView src, TextView *out, int base)
 
     // For performance in common cases, use the templated conversion.
     switch (base) {
-    case 8:
-      zret = svto_radix<8>(src);
-      break;
-    case 10:
-      zret = svto_radix<10>(src);
-      break;
-    case 16:
-      zret = svto_radix<16>(src);
-      break;
-    default:
-      while (src.size() && (0 <= (v = svtoi_convert[static_cast<unsigned char>(*src)])) && v < base) {
-        auto n = zret * base + v;
-        if (n < zret) {
-          zret = std::numeric_limits<uintmax_t>::max();
-          break; // overflow, stop parsing.
+      case 8:zret = svto_radix<8>(src);
+        break;
+      case 10:zret = svto_radix<10>(src);
+        break;
+      case 16:zret = svto_radix<16>(src);
+        break;
+      default:
+        while (src.size() && (0 <= (v = svtoi_convert[static_cast<unsigned char>(*src)])) &&
+               v < base) {
+          auto n = zret * base + v;
+          if (n < zret) {
+            zret = std::numeric_limits<uintmax_t>::max();
+            break; // overflow, stop parsing.
+          }
+          zret = n;
+          ++src;
         }
-        zret = n;
-        ++src;
-      }
-      break;
+        break;
     }
 
     if (out) {
@@ -164,8 +162,10 @@ swoc::svtou(TextView src, TextView *out, int base)
   return zret;
 }
 
-// Do the template instantions.
-template std::ostream &swoc::TextView::stream_write(std::ostream &, const swoc::TextView &) const;
+// Do the template instantiations.
+template std::ostream& TextView::stream_write(std::ostream&, const TextView&) const;
+
+}} // namespace swoc
 
 namespace std
 {
diff --git a/swoc++/src/bw_format.cc b/swoc++/src/bw_format.cc
index 6265577..4246593 100644
--- a/swoc++/src/bw_format.cc
+++ b/swoc++/src/bw_format.cc
@@ -1,21 +1,8 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Apache Software Foundation 2019
 /** @file
 
     Formatted output for BufferWriter.
-
-    @section license License
-
-    Licensed to the Apache Software Foundation (ASF) under one or more contributor license
-    agreements.  See the NOTICE file distributed with this work for additional information regarding
-    copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with the License.  You may
-    obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software distributed under the
-    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-    express or implied. See the License for the specific language governing permissions and
-    limitations under the License.
  */
 
 #include <array>
@@ -823,7 +810,7 @@ bwformat(BufferWriter &w, bwf::Spec const &spec, IpAddr const &addr)
 namespace {
 } // namespace
 
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
 
 namespace std
 {
diff --git a/swoc++/src/bw_ip_format.cc b/swoc++/src/bw_ip_format.cc
index 38ce284..afddfcf 100644
--- a/swoc++/src/bw_ip_format.cc
+++ b/swoc++/src/bw_ip_format.cc
@@ -1,21 +1,8 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Apache Software Foundation 2019
 /** @file
 
   BufferWriter formatting for IP address data.
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
-  See the NOTICE file distributed with this work for additional information regarding copyright
-  ownership.  The ASF licenses this file to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance with the License.  You may obtain a
-  copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software distributed under the License
-  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
-  or implied. See the License for the specific language governing permissions and limitations under
-  the License.
  */
 
 #include "swoc/swoc_ip.h"
diff --git a/swoc++/src/swoc_file.cc b/swoc++/src/swoc_file.cc
index 74f9fb9..fb88d07 100644
--- a/swoc++/src/swoc_file.cc
+++ b/swoc++/src/swoc_file.cc
@@ -3,21 +3,6 @@
 /** @file
 
     Minimalist version of std::filesystem.
-
-    @section license License
-
-    Licensed to the Apache Software Foundation (ASF) under one or more contributor license
-    agreements.  See the NOTICE file distributed with this work for additional information regarding
-    copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with the License.  You may
-    obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software distributed under the
-    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
-    express or implied. See the License for the specific language governing permissions and
-    limitations under the License.
  */
 
 #include <fcntl.h>
@@ -131,4 +116,4 @@ bwformat(BufferWriter& w, bwf::Spec const& spec, file::path const& p) {
   return bwformat(w, spec, p.string());
 }
 
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc
diff --git a/swoc++/src/swoc_ip.cc b/swoc++/src/swoc_ip.cc
index 9d94420..1d8f88c 100644
--- a/swoc++/src/swoc_ip.cc
+++ b/swoc++/src/swoc_ip.cc
@@ -966,4 +966,4 @@ void IP6Range::NetSource::search_narrower() {
   }
 }
 
-}} // namespace SWOC_NAMESPACE
+}} // namespace swoc