Opened 10 years ago
Closed 10 years ago
#7972 closed Bugs (fixed)
[Coroutine] warning with GCC
| Reported by: | Owned by: | olli | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | coroutine |
| Version: | Boost 1.52.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
I am using GCC with -pedantic option. happen few warning.
#include <boost/coroutine/all.hpp>
#include <boost/foreach.hpp>
typedef boost::coroutines::coroutine<int()> coroutine;
void f(coroutine::caller_type& caller)
{
caller(1);
caller(2);
caller(3);
}
int main()
{
coroutine coro(f);
BOOST_FOREACH (int x, coro) {
std::cout << x << std::endl;
}
}
In file included from /Users/myuser/repository/GitHub/Boost/boost/coroutine/all.hpp:11:0,
from main.cpp:1:
/Users/myuser/repository/GitHub/Boost/boost/coroutine/coroutine.hpp:118:47: warning: extra ';' [-pedantic]
/Users/myuser/repository/GitHub/Boost/boost/coroutine/coroutine.hpp:665:47: warning: extra ';' [-pedantic]
faithandbrave:cpp myuser$ sh build.sh
In file included from /Users/myuser/repository/GitHub/Boost/boost/coroutine/all.hpp:11:0,
from main.cpp:1:
/Users/myuser/repository/GitHub/Boost/boost/coroutine/coroutine.hpp:118:47: warning: extra ';' [-pedantic]
/Users/myuser/repository/GitHub/Boost/boost/coroutine/coroutine.hpp:665:47: warning: extra ';' [-pedantic]
faithandbrave:cpp myuser$ sh build.sh
In file included from /Users/myuser/repository/GitHub/Boost/boost/coroutine/all.hpp:11:0,
from main.cpp:2:
/Users/myuser/repository/GitHub/Boost/boost/coroutine/coroutine.hpp:118:47: warning: extra ';' [-pedantic]
/Users/myuser/repository/GitHub/Boost/boost/coroutine/coroutine.hpp:665:47: warning: extra ';' [-pedantic]
/Users/myuser/repository/GitHub/Boost/boost/coroutine/coroutine.hpp: In instantiation of 'typename boost::coroutines::coroutine<Signature>::iterator boost::coroutines::range_end(boost::coroutines::coroutine<Signature>&) [with Signature = int(); typename boost::coroutines::coroutine<Signature>::iterator = boost::coroutines::detail::coroutine_op<int(), boost::coroutines::coroutine<int()>, int, 0>::iterator]':
/Users/myuser/repository/GitHub/Boost/boost/range/end.hpp:102:25: required from 'typename boost::range_iterator<C>::type boost::range_adl_barrier::end(T&) [with T = boost::coroutines::coroutine<int()>; typename boost::range_iterator<C>::type = boost::coroutines::detail::coroutine_op<int(), boost::coroutines::coroutine<int()>, int, 0>::iterator]'
/Users/myuser/repository/GitHub/Boost/boost/foreach.hpp:714:102: required from 'boost::foreach_detail_::auto_any<typename boost::foreach_detail_::foreach_iterator<T, C>::type> boost::foreach_detail_::end(boost::foreach_detail_::auto_any_t, boost::foreach_detail_::type2type<T, C>*, mpl_::false_*) [with T = boost::coroutines::coroutine<int()>; C = mpl_::bool_<false>; typename boost::foreach_detail_::foreach_iterator<T, C>::type = boost::coroutines::detail::coroutine_op<int(), boost::coroutines::coroutine<int()>, int, 0>::iterator; boost::foreach_detail_::auto_any_t = const boost::foreach_detail_::auto_any_base&; mpl_::false_ = mpl_::bool_<false>]'
main.cpp:18:5: required from here
/Users/myuser/repository/GitHub/Boost/boost/coroutine/coroutine.hpp:1380:1: warning: unused parameter 'c' [-Wunused-parameter]
Note:
See TracTickets
for help on using tickets.
