Commit 3ce0e496 authored by Scott Cyphers's avatar Scott Cyphers

Use typeid properly; need to use dereferenced types so the compiler doesn't infer the static type.

parent 51808ee1
...@@ -68,10 +68,8 @@ namespace ngraph ...@@ -68,10 +68,8 @@ namespace ngraph
** Return true if this has the same implementing class as call. This ** Return true if this has the same implementing class as call. This
** will be used by the pattern matcher when comparing a pattern ** will be used by the pattern matcher when comparing a pattern
** graph against the graph. ** graph against the graph.
** TODO: typeids are Node*, doc says they should be the actual classes.
**/ **/
bool has_same_op(const Node::ptr& node) { return typeid(this) == typeid(node.get()); } bool has_same_op(const Node::ptr& node) const { return typeid(*this) == typeid(*node.get()); }
protected: protected:
std::vector<Node::ptr> m_arguments; std::vector<Node::ptr> m_arguments;
......
...@@ -62,7 +62,7 @@ TEST(build_graph, as_type) ...@@ -62,7 +62,7 @@ TEST(build_graph, as_type)
} }
// Check Call comparisons // Check Call comparisons
TEST(DISABLED_build_graph, call_comparison) TEST(build_graph, call_comparison)
{ {
auto fun = make_shared<Function>(3); auto fun = make_shared<Function>(3);
fun->parameter(0)->type(element::float32_t, {32, 3}); fun->parameter(0)->type(element::float32_t, {32, 3});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment