You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Kalmár Róbert (Jira)" <ji...@apache.org> on 2021/01/27 22:29:00 UTC
[jira] [Created] (MINIFICPP-1462) Fix incorrect usage of move
constructors and assignment operators
Kalmár Róbert created MINIFICPP-1462:
----------------------------------------
Summary: Fix incorrect usage of move constructors and assignment operators
Key: MINIFICPP-1462
URL: https://issues.apache.org/jira/browse/MINIFICPP-1462
Project: Apache NiFi MiNiFi C++
Issue Type: Task
Reporter: Kalmár Róbert
There are multiple classes that have invalid move constructors and operators like
{code:java}
explicit Connectable(const Connectable &&other);
{code}
The proper signature for move constructors are
{code:java}
Connectable(Connectable &&other);{code}
There isn't much point of accepting a _*const T&&*_ in almost any case since moving requires modification of the argument. Using _*const &&*_ **results in copying which defeats the purpose of move constructors. Unless there aren't restrictions in the supported compilers using
{code:java}
Connectable(Connectable &&other) = default;{code}
should be preferred.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)