diff --git a/extent.cpp b/extent.cpp index a8757f41..2ee225a7 100644 --- a/extent.cpp +++ b/extent.cpp @@ -212,7 +212,7 @@ extent_range::iterator::operator!= (const iterator &rhs) const /////////////////////////////////////////////////////////////////////////////// -namespace debug { +namespace util { namespace debug { template struct validator { static bool is_valid (const extent &e) @@ -222,13 +222,13 @@ namespace debug { [] (auto i) { return i >= 0; }); } }; -} +} } -template bool debug::valid (const extent<2,float>&); -template bool debug::valid (const extent<2,double>&); -template bool debug::valid (const extent<2,uint16_t>&); -template bool debug::valid (const extent<2,uint32_t>&); -template bool debug::valid (const extent<2,uint64_t>&); +template bool util::debug::valid (const extent<2,float>&); +template bool util::debug::valid (const extent<2,double>&); +template bool util::debug::valid (const extent<2,uint16_t>&); +template bool util::debug::valid (const extent<2,uint32_t>&); +template bool util::debug::valid (const extent<2,uint64_t>&); /////////////////////////////////////////////////////////////////////////////// diff --git a/geom/aabb.cpp b/geom/aabb.cpp index 617af305..ef48dc5e 100644 --- a/geom/aabb.cpp +++ b/geom/aabb.cpp @@ -205,7 +205,7 @@ AABB::operator== (const AABB rhs) const //----------------------------------------------------------------------------- -namespace debug { +namespace util { namespace debug { template struct validator { static bool is_valid (const AABB &b) @@ -217,7 +217,7 @@ namespace debug { return true; } }; -} +} } //----------------------------------------------------------------------------- @@ -233,7 +233,7 @@ util::geom::operator<< (std::ostream &os, util::geom::AABB b) //----------------------------------------------------------------------------- #define INSTANTIATE_S_T(S,T) \ namespace util { namespace geom { template struct AABB; } } \ -template bool debug::valid (const AABB&); \ +template bool util::debug::valid (const AABB&); \ template std::ostream& util::geom::operator<< (std::ostream&, AABB); #define INSTANTIATE(T) \ diff --git a/region.cpp b/region.cpp index 9472e91d..9fb3f510 100644 --- a/region.cpp +++ b/region.cpp @@ -369,7 +369,7 @@ util::operator<< (std::ostream &os, const util::region &rhs) { /////////////////////////////////////////////////////////////////////////////// -namespace debug { +namespace util { namespace debug { template struct validator { static bool is_valid (const util::region &r) @@ -380,16 +380,14 @@ namespace debug { return r.area () >= 0 && min (r.e) >= 0; } }; -} +} } /////////////////////////////////////////////////////////////////////////////// #define INSTANTIATE_S_T(S,T) \ -namespace util { \ - template struct region; \ - template std::ostream& operator<< (std::ostream&, const region&); \ -} \ -namespace debug { template struct debug::validator; } +template struct util::region; \ +template std::ostream& util::operator<< (std::ostream&, const region&); \ +template struct util::debug::validator; #define INSTANTIATE(T) \ INSTANTIATE_S_T(2,T) \