Hi,
i was checking if my code is compatible with c++98 standard and i've
encounterd compile error. With -std c++11 option everything works
fine.
Below i've written code causing same problem.
#include
#include
typedef boost::coroutines::coroutine coro_t;
struct coro_test{
coro_test() {}
void coro_fun(typename coro_t::caller_type& ca)const{
boost::system::error_code ec;
boost::tie(ec, boost::tuples::ignore) = ca.get();
ca();
}
coro_t coro;
};
int main(int argc, char *argv[])
{
{
boost::system::error_code ec;
coro_t coro2; //default construction is ok
coro_test ctest; //compile error , why ???
coro_t coro( boost::bind(&coro_test::coro_fun, &ctest,
_1),coro_t::arguments( ec, 7));
coro = coro_t(boost::bind(&coro_test::coro_fun, &ctest,
_1),coro_t::arguments( ec, 7));
}
...
/usr/local/include/boost/type_traits/is_function.hpp:50: błąd:forming
pointer to reference type
'boost::rv >&'
/usr/local/include/boost/type_traits/is_function.hpp:102: błąd:'value'
is not a member of
'boost::detail::is_function_impl >&>'
/usr/local/include/boost/type_traits/is_convertible.hpp:354:
błąd:'value' is not a member of
'boost::is_function >&>'
/usr/local/include/boost/utility/enable_if.hpp:59: błąd:'value' is not
a member of 'boost::is_convertible&,
boost::rv >&>'
I work with Qt, g++ compiler on ubuntu 12.10
Is this library bug ?