Skip to content
Snippets Groups Projects
  • Andreas Nüßing's avatar
    925dbac3
    [bugfix] include the matrixmarket header to handle default argument · 925dbac3
    Andreas Nüßing authored
    The standard states (8.3.6/4) that adding default arguments in later
    function declarations are only valid for non-template functions.
    In matrixmarket.hh, the function template loadMatrixMarket is declared
    and a default argument for the last parameter is provided. In
    owneroverlapcopy.hh, OwnerOverlapCopyCommunication contains a friend
    declaration of loadMatrixMarket without the default parameter. If now
    owneroverlapcopy.hh is included before matrixmarket.hh, the friend
    declaration is the first declaration and the default parameter in
    matrixmarket.hh is invalid.
    By including matrixmarket.hh in owneroverlapcopy.hh, we make sure that
    the declaration which provides the default argument is always the first
    one.
    925dbac3
    History
    [bugfix] include the matrixmarket header to handle default argument
    Andreas Nüßing authored
    The standard states (8.3.6/4) that adding default arguments in later
    function declarations are only valid for non-template functions.
    In matrixmarket.hh, the function template loadMatrixMarket is declared
    and a default argument for the last parameter is provided. In
    owneroverlapcopy.hh, OwnerOverlapCopyCommunication contains a friend
    declaration of loadMatrixMarket without the default parameter. If now
    owneroverlapcopy.hh is included before matrixmarket.hh, the friend
    declaration is the first declaration and the default parameter in
    matrixmarket.hh is invalid.
    By including matrixmarket.hh in owneroverlapcopy.hh, we make sure that
    the declaration which provides the default argument is always the first
    one.