diff --git a/dune/solvers/common/copyorreference.hh b/dune/solvers/common/copyorreference.hh index ae5a0689f84edebdce9702e4613fd6de7a97e969..fae26b7830caea814555ccb7a9e4835c7d1a3b88 100644 --- a/dune/solvers/common/copyorreference.hh +++ b/dune/solvers/common/copyorreference.hh @@ -21,6 +21,16 @@ namespace Solvers { * * If T is of reference type, the wrapper stores a reference * to the passed object. Otherwise it stores a copy. + * + * Internally, for reference type T, this wrapper stores a pointer, which + * results in CopyOrReference being copyable (etc.). This sets this wrapper + * apart from having a pure member type T in a class in particular. + * Furthermore, using this wrapper provides gclarity for the reader that type T + * may be both, of raw type or of reference type. + * + * Usage of this wrapper comes at the price of get()-semantics. + * As an alternative with pointer semantics consider using wrap_own_share but + * mind the dynamic overhead. */ template<class T> class CopyOrReference