Skip to content

Commit

Permalink
refs #16 Более узкое форматирование
Browse files Browse the repository at this point in the history
  • Loading branch information
izvolov committed Dec 31, 2015
1 parent 4edeb4f commit 3031a54
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions burst/iterator/detail/join_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,12 @@ namespace burst
m_items_remaining(0)
{
BOOST_STATIC_ASSERT(boost::is_same<typename InputRange::value_type, range_type>::value);
boost::algorithm::copy_if(ranges, std::back_inserter(*m_ranges), not boost::bind(&range_type::empty, _1));

const auto to_size = [] (const auto & r) { return r.size(); };
const auto not_empty = [] (const auto & r) { return not r.empty(); };
boost::algorithm::copy_if(ranges, std::back_inserter(*m_ranges), not_empty);

using boost::adaptors::transformed;
const auto to_size = [] (const auto & r) { return r.size(); };
m_items_remaining = boost::accumulate(*m_ranges | transformed(to_size), 0u);
}

Expand Down

0 comments on commit 3031a54

Please sign in to comment.