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

fix compilation in g++-5

parent 9881398b
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@
 
#include <stdexcept>
#include <typeindex>
#include <iostream>
 
namespace std {
 
......@@ -192,7 +193,7 @@ public:
template < typename R >
void Visit1 ( void * userData, const T & first, const R & second ) const {
if ( std::type_index ( typeid ( T ) ) == std::type_index ( typeid ( second ) ) )
this->Visit ( userData, first, static_cast < const T & > ( second ) );
this->Visit ( userData, first, dynamic_cast < const T & > ( second ) );
else
throw std::logic_error ( "Same visitor: Visited types are different." );
}
......@@ -212,7 +213,7 @@ public:
template < typename R >
void Visit1 ( void * userData, const T & first, const R & second ) const {
if ( std::type_index ( typeid ( T ) ) == std::type_index ( typeid ( second ) ) )
this->Visit ( userData, first, static_cast < const T & > ( second ) );
this->Visit ( userData, first, dynamic_cast < const T & > ( second ) ); // tady ten dynamic cast muze byt i static cast ale to by to muselo na g++ 5.2 fungovat
else
throw std::logic_error ( "Same visitor: Visited types are different." );
}
......
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