Skip to content
Snippets Groups Projects
Commit ab8abefc authored by graeser's avatar graeser Committed by graeser
Browse files

Disable the constructor from anything

It is unclear where and if it is needed and it's very dangerous for the
following reason: Suppose the that you have some class

class C
{
    C(const NullOperator<A>& a): a_(a) {}
    const NullOperator<A>& a_;
};

and make the not so unlikely error to call the constructor of C
with a NullOperator<B>. Then the code will silently compile but the
'a_' is a reference to an invalid temporary after the constructor call.

[[Imported from SVN: r8227]]
parent d7410cac
No related branches found
No related tags found
No related merge requests found
......@@ -50,8 +50,8 @@ class NullOperator
*
* This is here to allow for NullOperator as block_type (this is needed in the constructor of RowDummy)
*/
template <class T>
NullOperator(const T& t){}
// template <class T>
// NullOperator(const T& t){}
/** \brief Matrix-Vector multiplication
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment