base: explicit copy constructor for Rpc_in_buffer

According to the "rule of three" [1] and C++11 [2] Rpc_in_buffer needs
to have an explicit copy constructor since it also has user defined
copy assignment operator. Both clang and newer versions of GCC complain
about this.

[1] https://en.cppreference.com/w/cpp/language/rule_of_three
[2] https://www.ece.uvic.ca/~frodo/cppdraft/n4659/html/depr.impldec

Issue #3938
This commit is contained in:
Piotr Tworek 2020-10-28 00:12:53 +01:00 committed by Christian Helmuth
parent 8d6ca9556f
commit d4a3aa7eda

View File

@ -97,6 +97,9 @@ class Genode::Rpc_in_buffer : public Rpc_in_buffer_base
*/
Rpc_in_buffer() { }
Rpc_in_buffer(const Rpc_in_buffer &in)
: Rpc_in_buffer_base(in.base(), in.size()) { }
Rpc_in_buffer &operator = (Rpc_in_buffer<MAX_SIZE> const &from)
{
_base = from.base();