Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

gcc 7.3.0

Options
Warnings
Boost 1.69.0
C++17(GNU)
no pedantic
Raw compiler options
-DBOOST_COROUTINES_NO_DEPRECATION_WARNING -lboost_thread -lboost_context -lboost_coroutine -lboost_system

Author

anonymous

over 6 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.69.0/gcc-7.3.0/include -std=gnu++17 -DBOOST_COROUTINES_NO_DEPRECATION_WARNING -lboost_thread -lboost_context -lboost_coroutine -lboost_system
prog.cc:18:34: error: 'boost::asio::experimental::awaitable' has not been declared
 using boost::asio::experimental::awaitable;
                                  ^~~~~~~~~
prog.cc:19:34: error: 'boost::asio::experimental::co_spawn' has not been declared
 using boost::asio::experimental::co_spawn;
                                  ^~~~~~~~
prog.cc:22:50: error: 'this_coro' is not a namespace-name
 namespace this_coro = boost::asio::experimental::this_coro;
                                                  ^~~~~~~~~
prog.cc:22:59: error: expected namespace-name before ';' token
 namespace this_coro = boost::asio::experimental::this_coro;
                                                           ^
prog.cc:103:3: error: 'awaitable' does not name a type; did you mean 'mutable'?
   awaitable<void> reader()
   ^~~~~~~~~
   mutable
prog.cc:124:3: error: 'awaitable' does not name a type; did you mean 'mutable'?
   awaitable<void> writer()
   ^~~~~~~~~
   mutable
prog.cc: In lambda function:
prog.cc:88:51: error: 'using element_type = class chat_session {aka class chat_session}' has no member named 'reader'
         [self = shared_from_this()]{ return self->reader(); },
                                                   ^~~~~~
prog.cc: In member function 'void chat_session::start()':
prog.cc:87:5: error: 'co_spawn' was not declared in this scope
     co_spawn(socket_.get_executor(),
     ^~~~~~~~
prog.cc: In lambda function:
prog.cc:92:51: error: 'using element_type = class chat_session {aka class chat_session}' has no member named 'writer'
         [self = shared_from_this()]{ return self->writer(); },
                                                   ^~~~~~
prog.cc: At global scope:
prog.cc:166:1: error: 'awaitable' does not name a type; did you mean 'mutable'?
 awaitable<void> listener(tcp::acceptor acceptor)
 ^~~~~~~~~
 mutable
prog.cc: In lambda function:
prog.cc:199:23: error: 'listener' was not declared in this scope
           [&]{ return listener(tcp::acceptor(io_context, {tcp::v4(), port})); },
                       ^~~~~~~~
prog.cc:199:23: note: suggested alternative: 'listen'
           [&]{ return listener(tcp::acceptor(io_context, {tcp::v4(), port})); },
                       ^~~~~~~~
                       listen
prog.cc: In function 'int main(int, char**)':
prog.cc:198:7: error: 'co_spawn' was not declared in this scope
       co_spawn(io_context,
       ^~~~~~~~
Exit Code:
1