• Dean Moldovan's avatar
    Always use return_value_policy::move for rvalues (#510) · d079f41c
    Dean Moldovan authored
    Fixes #509.
    
    The move policy was already set for rvalues in PR #473, but this only
    applied to directly cast user-defined types. The problem is that STL
    containers cast values indirectly and the rvalue information is lost.
    Therefore the move policy was not set correctly. This commit fixes it.
    
    This also makes an additional adjustment to remove the `copy` policy
    exception: rvalues now always use the `move` policy. This is also safe
    for copy-only rvalues because the `move` policy has an internal fallback
    to copying.
    d079f41c
libsize.py 1.07 KB