boostorg / boostorg/lambda

Compilation error with c++17 (GCC) or higher.

Open
#26 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
20
Forks
42
PR merge metrics
No merged PRs in 30d

Description

template
void do_something_to_all(_Can& __can, const _Predicate& __pred) {for (BOOST_AUTO(iter, __can.begin()); iter != __can.end(); ++iter) __pred(*iter);}

template\
size_t get_size_in_byte(const _Can& __can)
{
size_t size_in_byte = 0;
do_something_to_all(__can, size_in_byte += boost::lambda::bind(&_Can::value_type::size, boost::lambda::_1));
return size_in_byte;
}

std::list\ can;
can.emplace_back("123");
can.emplace_back("456");
printf("%zu\n", get_size_in_byte(can));

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.