Mentions légales du service

Skip to content
  • Théotime Grohens's avatar
    791d48bb
    Delete copy operator in Mutation classes · 791d48bb
    Théotime Grohens authored
    This commit gets rid of the -Wdefaulted-function-deleted warning
    that popped up in Mutation-derived classes.
    
    It came from the fact that Mutation.h had these definitions:
    
                   |     copy      |      move
    ----------------------------------------------------
    constructor    |   default     |    default
    ----------------------------------------------------
    operator       |   delete      |    delete
    
    whereas the derived classes had the following:
    
                   |     copy      |      move
    ----------------------------------------------------
    constructor    |   default     |    delete
    ----------------------------------------------------
    operator       |   default     |    delete
    
    This meant that the move operator was defaulted in the base class
    but deleted in the derived classes, producing the warning (the
    discrepancy was introduced in 6615dbb4).
    
    This commit deletes all copy operators, leaving only copy constructors,
    which are used in the Clone() method shared by Mutation classes.
    
    Note that in *HT classes, the copy constructor is defaulted but
    the classes contain pointers, so there might be a memory issue when
    calling the constructor.
    791d48bb
    Delete copy operator in Mutation classes
    Théotime Grohens authored
    This commit gets rid of the -Wdefaulted-function-deleted warning
    that popped up in Mutation-derived classes.
    
    It came from the fact that Mutation.h had these definitions:
    
                   |     copy      |      move
    ----------------------------------------------------
    constructor    |   default     |    default
    ----------------------------------------------------
    operator       |   delete      |    delete
    
    whereas the derived classes had the following:
    
                   |     copy      |      move
    ----------------------------------------------------
    constructor    |   default     |    delete
    ----------------------------------------------------
    operator       |   default     |    delete
    
    This meant that the move operator was defaulted in the base class
    but deleted in the derived classes, producing the warning (the
    discrepancy was introduced in 6615dbb4).
    
    This commit deletes all copy operators, leaving only copy constructors,
    which are used in the Clone() method shared by Mutation classes.
    
    Note that in *HT classes, the copy constructor is defaulted but
    the classes contain pointers, so there might be a memory issue when
    calling the constructor.
Loading