Fix thread_pool test to work with ASIO_NO_TYPEID (i.e. no RTTI).

This commit is contained in:
Christopher Kohlhoff 2020-10-31 11:47:32 +11:00
parent 8810b3d2ae
commit 7e4df5a9df

View File

@ -90,6 +90,10 @@ void thread_pool_test()
class test_service : public asio::execution_context::service
{
public:
#if defined(ASIO_NO_TYPEID)
static asio::execution_context::id id;
#endif // defined(ASIO_NO_TYPEID)
typedef test_service key_type;
test_service(asio::execution_context& ctx)
@ -101,6 +105,10 @@ private:
virtual void shutdown() {}
};
#if defined(ASIO_NO_TYPEID)
asio::execution_context::id test_service::id;
#endif // defined(ASIO_NO_TYPEID)
void thread_pool_service_test()
{
asio::thread_pool pool1(1);