From: g0dil Date: Fri, 4 Sep 2009 09:44:31 +0000 (+0000) Subject: Socket/Protocols/INet: Remove left over debug code (see last commit) X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=8a1b6c58c91e38ad2adfa5c8601ce9dd0764e0d3;hp=5e230d44a5ea8916dc41f4a5b9958a26fbf8e1a0;p=senf.git Socket/Protocols/INet: Remove left over debug code (see last commit) git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1378 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Socket/Protocols/INet/INet6Address.test.cc b/senf/Socket/Protocols/INet/INet6Address.test.cc index 11dd197..9b9ee81 100644 --- a/senf/Socket/Protocols/INet/INet6Address.test.cc +++ b/senf/Socket/Protocols/INet/INet6Address.test.cc @@ -36,46 +36,6 @@ #define prefix_ ///////////////////////////////cc.p//////////////////////////////////////// -namespace { - - template - prefix_ ForwardIterator1 find_if_mask(unsigned bits, ForwardIterator1 b1, - ForwardIterator1 e1, ForwardIterator2 b2, - Function fn) - { - std::cerr << ">>> " << bits << ' ' << e1-b1 << '\n'; - for(; bits>8 && b1 != e1; bits -= 8, ++b1, ++b2) - if (fn(*b1, *b2, boost::lambda::make_const(0xFFu))) - return b1; - std::cerr << ">>> " << bits << ' ' << e1-b1 << '\n'; - if (bits > 0 && b1 != e1) - if (fn( *(b1++), *(b2++), boost::lambda::make_const(~ senf::detail::low_bits_mask(8-bits)))) - return b1; - std::cerr << ">>> " << bits << ' ' << e1-b1 << '\n'; - for(; b1 != e1; ++b1, ++b2) - if (fn(*b1, *b2, boost::lambda::make_const(0u))) - return b1; - return e1; - } - - bool match(senf::INet6Network const & n, senf::INet6Address a) - { - using boost::lambda::_1; - using boost::lambda::_2; - using boost::lambda::_3; - using boost::lambda::ret; - using boost::lambda::constant; - senf::INet6Address na (n.address()); - return find_if_mask( - n.prefix_len(), na.begin(), na.end(), a.begin(), - ( - std::cerr << constant(">> ") << _1 << ' ' << _2 << ' ' << ret(_3) << '\n', - _1 != (_2 & _3) - )) == na.end(); - } - -} - BOOST_AUTO_UNIT_TEST(inet6Address) { using senf::INet6Address;