chriskohlhoff / asio

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

buffer_literals::detail::bin_literal and hex_literal members should be constexpr #1344

Open qicosmos opened 11 months ago

qicosmos commented 11 months ago

buffer_literals is cool, however it's not allowed to define a constexpr buffer_literal, so the members(https://github.com/chriskohlhoff/asio/blob/master/asio/include/asio/buffer.hpp#L2761C5-L2761C5) should be defined as constexpr:

this is my test code: https://godbolt.org/z/sfjo3hjhj