File indexing completed on 2024-11-15 09:04:17
0001
0002
0003
0004
0005 #ifndef BOOST_COBALT_COBALT_FOR_HPP
0006 #define BOOST_COBALT_COBALT_FOR_HPP
0007
0008 #include <boost/preprocessor/cat.hpp>
0009
0010 #define BOOST_COBALT_FOR_IMPL(Value, Expression, Id) \
0011 for (auto && Id = Expression; Id; ) \
0012 if (Value = co_await Id; false) {} else
0013
0014 #define BOOST_COBALT_FOR(Value, Expression) \
0015 BOOST_COBALT_FOR_IMPL(Value, Expression, BOOST_PP_CAT(__boost_cobalt_for_loop_value__, __LINE__))
0016
0017 #endif