From 9b0937bc63afe57809df931ba8a0c875527485f2 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 7 Sep 2018 01:56:41 +0200 Subject: [PATCH] ChainSearch: move into namespace iter ...seems to be a not-so-commonly used helper --- src/lib/iter-chain-search.hpp | 47 ++++++++++++------------ tests/library/iter-chain-search-test.cpp | 4 +- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/lib/iter-chain-search.hpp b/src/lib/iter-chain-search.hpp index e6a0b6651..353f73c86 100644 --- a/src/lib/iter-chain-search.hpp +++ b/src/lib/iter-chain-search.hpp @@ -50,31 +50,30 @@ namespace lib { +namespace iter { using std::move; using std::forward; using std::string; - namespace iter { + + namespace { // implementation helpers... - namespace { - - template - auto - buildSearchFilter (SRC&& dataSource) - { - return treeExplore (forward (dataSource)) - .mutableFilter(); - } - - template - auto - buildExplorer (SRC&& dataSource, FUN&& expandFunctor) - { - return buildSearchFilter (forward (dataSource)) - .expand (forward (expandFunctor)) - .expandAll(); - } + template + auto + buildSearchFilter (SRC&& dataSource) + { + return treeExplore (forward (dataSource)) + .mutableFilter(); + } + + template + auto + buildExplorer (SRC&& dataSource, FUN&& expandFunctor) + { + return buildSearchFilter (forward (dataSource)) + .expand (forward (expandFunctor)) + .expandAll(); } /** @@ -91,8 +90,8 @@ namespace lib { using Pipeline = decltype( buildExplorer (std::declval(), std::declval()) ); }; - - } // namespace iter + }//(End)implementation helpers + @@ -107,9 +106,9 @@ namespace lib { */ template class IterChainSearch - : public iter::_IterChainSetup::Pipeline + : public _IterChainSetup::Pipeline { - using _Base = typename iter::_IterChainSetup::Pipeline; + using _Base = typename _IterChainSetup::Pipeline; // using _Parent = IterStateWrapper; public: @@ -202,5 +201,5 @@ namespace lib { -} // namespace lib +}} // namespace lib::iter #endif /*SRC_LIB_ITER_CHAIN_SEARCH_H*/ diff --git a/tests/library/iter-chain-search-test.cpp b/tests/library/iter-chain-search-test.cpp index 2a2e7b708..eb6f82f11 100644 --- a/tests/library/iter-chain-search-test.cpp +++ b/tests/library/iter-chain-search-test.cpp @@ -39,6 +39,7 @@ namespace lib { +namespace iter{ namespace test{ using ::Test; @@ -157,5 +158,4 @@ namespace test{ LAUNCHER (IterChainSearch_test, "unit common"); -}} // namespace lib::test - +}}} // namespace lib::iter::test