summaryrefslogtreecommitdiff
path: root/src/range
diff options
context:
space:
mode:
Diffstat (limited to 'src/range')
-rw-r--r--src/range/fwd.hpp4
-rw-r--r--src/range/slice.cpp5
-rw-r--r--src/range/slice.hpp4
-rw-r--r--src/range/slice.tcc4
-rw-r--r--src/range/slice_test.cpp3
5 files changed, 20 insertions, 0 deletions
diff --git a/src/range/fwd.hpp b/src/range/fwd.hpp
index 0c22595..65fd010 100644
--- a/src/range/fwd.hpp
+++ b/src/range/fwd.hpp
@@ -21,8 +21,12 @@
# include "../sanity.hpp"
+
+namespace tmwa
+{
// meh, add more when I feel like it
template<class T>
class Slice;
+} // namespace tmwa
#endif // TMWA_RANGE_FWD_HPP
diff --git a/src/range/slice.cpp b/src/range/slice.cpp
index 5e00233..f93c19f 100644
--- a/src/range/slice.cpp
+++ b/src/range/slice.cpp
@@ -19,3 +19,8 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "../poison.hpp"
+
+
+namespace tmwa
+{
+} // namespace tmwa
diff --git a/src/range/slice.hpp b/src/range/slice.hpp
index ce35acf..8cd9203 100644
--- a/src/range/slice.hpp
+++ b/src/range/slice.hpp
@@ -26,6 +26,9 @@
# include <type_traits>
# include <vector>
+
+namespace tmwa
+{
template<class T>
class Slice
{
@@ -67,6 +70,7 @@ public:
Slice pslice(size_t b, size_t e) const;
Slice islice(iterator b, iterator e) const;
};
+} // namespace tmwa
# include "slice.tcc"
diff --git a/src/range/slice.tcc b/src/range/slice.tcc
index 45dac50..a1c136f 100644
--- a/src/range/slice.tcc
+++ b/src/range/slice.tcc
@@ -19,6 +19,9 @@
#include <cassert>
+
+namespace tmwa
+{
// simple pointer-wrapping iterator
template<class T>
class Slice<T>::iterator
@@ -212,3 +215,4 @@ Slice<T> Slice<T>::islice(iterator b, iterator e) const
{
return Slice(&*b, &*e);
}
+} // namespace tmwa
diff --git a/src/range/slice_test.cpp b/src/range/slice_test.cpp
index a58cc78..f49b360 100644
--- a/src/range/slice_test.cpp
+++ b/src/range/slice_test.cpp
@@ -23,6 +23,8 @@
#include "../poison.hpp"
+namespace tmwa
+{
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
TEST(slice, slice)
@@ -110,3 +112,4 @@ TEST(slice, cast)
EXPECT_EQ(foos.size(), slice.size());
EXPECT_EQ(&foos.end()[-1], &slice.end()[-1]);
}
+} // namespace tmwa