chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.81k stars 1.2k forks source link

Default construct T #1261

Closed camerbam closed 1 year ago

camerbam commented 1 year ago

Default construct T instead of always constructing prefer_only::static_query()

I am getting a compile error without this change:

error: constexpr variable 'static_query_v<boost::asio::io_context::basic_executor_type<std::allocator<void>, 0>, const boost::asio::execution::detail::outstanding_work_t<0>>' must be initialized by a constant expression
  static BOOST_ASIO_CONSTEXPR const T static_query_v

I am still verifying the compiler version, but I am fairly certain it is clang.

I do not know if this is the correct solution. But I figure if I bring it up, you could at least explain to me what the correct solution is and then I can learn more. Thank you for taking a look at this.

camerbam commented 1 year ago

This is actually not needed. We figured out it was a bug in the compiler that was being used and is being fixed on their end.