Closed bstaletic closed 5 years ago
Yes, it totally make sense!
At the beginning of the project I was using VS2010 Pre C++11 but now I could even make a V2 full C++11 kwas always the plan)
Also, Database received a move ctor recently :)
Ok, so the first thing to note is that the Database move ctor introduced in #157 is guarded by #if __cplusplus >= 201103L
, which sadly does not work with Visual Studio.
Second thing is there is no unit tests nor examples to this.
I'll work to improve this asap, and then complete other classes with such move semantics as appropriate.
Things like
Database
andStatement
leverage RAII and own some kind of object, so it makes sense to make them non-copyable. However moving them around should be supported. Consider the following:I was trying to use this to save time constructing the
Statement
in a tight loop.