Inherit base_bytebuffer_t constructor instead of delegating to it

This may encourage the compiler to generate better code, and should
never generate worse code.
This commit is contained in:
Kp 2020-08-24 01:31:28 +00:00
parent 8e81726ac5
commit ce7c9946e8

View file

@ -545,7 +545,7 @@ namespace reader {
class bytebuffer_t : public detail::base_bytebuffer_t<const uint8_t, bytebuffer_t>
{
public:
bytebuffer_t(pointer u) : base_bytebuffer_t(u) {}
using base_bytebuffer_t::base_bytebuffer_t;
explicit bytebuffer_t(const bytebuffer_t &) = default;
bytebuffer_t(bytebuffer_t &&) = default;
};
@ -594,7 +594,7 @@ namespace writer {
class bytebuffer_t : public detail::base_bytebuffer_t<uint8_t, bytebuffer_t>
{
public:
bytebuffer_t(pointer u) : base_bytebuffer_t(u) {}
using base_bytebuffer_t::base_bytebuffer_t;
explicit bytebuffer_t(const bytebuffer_t &) = default;
bytebuffer_t(bytebuffer_t &&) = default;
};