Bug #6091
closedIs Wt::Dbo::ptr<C> move ready?
0%
Description
My class has only std::*
members which are move safe/ready, that's why I forced the default move constructor.
Now I added a Wt::Dbo::ptr<C>
member but I am not sure if I should leave the default forced move constructor or do some trickery with Wt::Dbo::ptr<C>
.
I can't find a move constructor for Wt::Dbo::ptr<C>
Ctrl+F: &&
https://github.com/emweb/wt/blob/d9dbba89f50763e00c7127916c91e2fb44e16280/src/Wt/Dbo/ptr.h#L564-L858
**
class MyEntity
{
public:
explicit MyEntity();
~MyEntity() = default;
MyEntity(const MyEntity& other) = default;
MyEntity& operator=(const MyEntity& other) = default;
// MOVE
MyEntity(MyEntity&& other) = default;
MyEntity& operator=(MyEntity&& other) = default;
template<class Action>
void persist(Action& a)
{
...
}
Wt::Dbo::ptr<OtherEntity> mOther;
std::string mSomething;
};
For non-union class types (class and struct), the move constructor performs full member-wise move of the object's bases and non-static members, in their initialization order, using direct initialization with an xvalue argument.
Updated by Roel Standaert about 7 years ago
- Status changed from New to InProgress
- Assignee set to Roel Standaert
No, but it definitely should be (and is probably trivial to implement).
Updated by Roel Standaert about 7 years ago
- Status changed from InProgress to Resolved
Now (with the latest pushes to GitHub) it should be, let me know if it misbehaves.
Updated by Roel Standaert about 7 years ago
- Status changed from Resolved to Closed