Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Boost adapters foreach
//Boost adapters foreach //g++ 4.9.1 #include <iostream> #include <boost/range/adaptors.hpp> #include <boost/foreach.hpp> #include <boost/assign/list_of.hpp> #include <boost/phoenix/phoenix.hpp> #include <set> int main() { std::set<std::string> aElementsSet = boost::assign::list_of("C")("D")("E")("F"); BOOST_FOREACH(const std::string& elementSet, aElementsSet | boost::adaptors::filtered(boost::phoenix::placeholders::arg1 == "C" || boost::phoenix::placeholders::arg1 == "F" ) ) { std::cout << elementSet << std::endl; } }
run
|
edit
|
history
|
help
0
Two-phase sample with GCC
不带头结点的单链表
unordered_map
q
float precision test
Hello World - verbose
Articulation and Bridges
template inhertinace
Riemann's prime number formula
Connected components in complement graph