Fix thread_pool test to work with ASIO_NO_TYPEID (i.e. no RTTI).
This commit is contained in:
parent
8810b3d2ae
commit
7e4df5a9df
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user