Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule A12-8-4 and default constructing data members in a move constructor
#1
Quoting the rationale of this A12-8-4:
Quote:Data members or base classes initialization in move constructor needs to be done with move semantics.
Does this mean that in order to comply with the rule, all data members in a move constructor must be initialized with move semantics, and thus no data members may be default constructed in a move constructor?
The text of the rule does not go that far, it merely prevents the use of copy semantics in move constructors.
Reply


Messages In This Thread
Rule A12-8-4 and default constructing data members in a move constructor - by Albin - 15-06-2022, 01:26 PM

Forum Jump:


Users browsing this thread: 4 Guest(s)