cpp_binder, a not-yet-useful tool for generating C++ bindings

ZombineDev via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon Sep 21 02:59:42 PDT 2015


On Monday, 21 September 2015 at 09:45:01 UTC, ZombineDev wrote:
> [...]

Another option is to introduce a special built-in function like 
std::move that just selects the rvalue overload. This would 
require a language change, but would save us from adding && type 
qualifiers (which is a far more invasive change with little 
benefit) and would not be complicated to implement in the 
compiler. For example:

auto my_vec = stdcpp.vector.vector!(stdcpp.thread.thread);
my_vec.push_back(__cpp_move(stdcpp.thread.thread(&threadFunc)));
//                 ^--- selects the correct && overload


More information about the Digitalmars-d-announce mailing list