Skip to content
Snippets Groups Projects
Forked from Dynare / preprocessor
Source project has a limited visibility.
  • Sébastien Villemot's avatar
    27952078
    No longer delete move constructor/assignment operator · 27952078
    Sébastien Villemot authored
    We follow the advice given by Josuttis in his book about move semantics.
    
    Deleting those member fuctions can be a bug if we want to allow copy semantics,
    because overload resolution will no longer fallback to the copy
    constructor/assignment operator when given an rvalue.
    
    In particular, this explain why it was not possible to delete the move
    assignment operator of the StaticModel class.
    27952078
    History
    No longer delete move constructor/assignment operator
    Sébastien Villemot authored
    We follow the advice given by Josuttis in his book about move semantics.
    
    Deleting those member fuctions can be a bug if we want to allow copy semantics,
    because overload resolution will no longer fallback to the copy
    constructor/assignment operator when given an rvalue.
    
    In particular, this explain why it was not possible to delete the move
    assignment operator of the StaticModel class.