[ 
https://issues.apache.org/jira/browse/MINIFICPP-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kalmár Róbert resolved MINIFICPP-1462.
--------------------------------------
    Resolution: Fixed

> 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
>            Assignee: Kalmár Róbert
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
>  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)

Reply via email to