[ 
https://issues.apache.org/jira/browse/THRIFT-2836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14237228#comment-14237228
 ] 

ASF GitHub Bot commented on THRIFT-2836:
----------------------------------------

Github user flandr commented on the pull request:

    https://github.com/apache/thrift/pull/271#issuecomment-65947358
  
    > Is there any specific reason for adding an option for this?
    
    My motivation for adding the functionality was avoiding copies for Thrift 
container types (e.g. list, set, map) when contemporary MoveConstructible STL 
implementations are available.
    
    If you're asking specifically about making it an option, my aim was to 
avoid compatibility issues for pre-C++11 toolchains. Regardless, in discussion 
on [THRIFT-2836](https://issues.apache.org/jira/browse/THRIFT-2836), Konrad 
Grochowski expressed a preference to just fold this functionality into the 
C++V2 generator, so we can probably close this out.


> Optionally generate C++11 MoveConstructible types
> -------------------------------------------------
>
>                 Key: THRIFT-2836
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2836
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C++ - Compiler
>    Affects Versions: 1.0
>            Reporter: Nate Rosenblum
>            Assignee: Nate Rosenblum
>
> Presently the cpp compiler only emits copy constructors for generated Thrift 
> types. This is sub-optimal when passing types as parameters to std::bind when 
> there are container fields that have move-constructible STL implementations. 
> Adding rvalue constructors & assignment operators will avoid copies in these 
> cases.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to