Skip to content
Snippets Groups Projects
Commit 473da521 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

tidy: avoid use of call of virtual method in constructor

parent 0ad94511
No related branches found
No related tags found
1 merge request!225Merge jt
......@@ -98,7 +98,7 @@ std::unique_ptr < abstraction::Value > ValueHolder < Type >::asValue ( bool move
 
template < class Type >
ValueHolder < Type >::ValueHolder ( Type && value, bool temporary ) : m_isTemporary ( temporary ) {
if ( TypeQualifiers::isLvalueRef ( abstraction::TypeQualifiers::typeQualifiers < Type > ( ) ) && this->isTemporary ( ) )
if ( TypeQualifiers::isLvalueRef ( abstraction::TypeQualifiers::typeQualifiers < Type > ( ) ) && m_isTemporary )
throw std::domain_error ( "Lvalue references cannot be temporaries." );
 
this->setValue ( std::forward < Type > ( value ) );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment