Move implementation from cc file to header, in order to allow call from
other headers and prevent linker errors.
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit): Move
implementation from here...
* ast/rust-ast-collector.h: ... to here.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
item.accept_vis (*this);
}
-template <typename T>
-void
-TokenCollector::visit (std::unique_ptr<T> &node)
-{
- node->accept_vis (*this);
-}
-
template <typename T>
void
TokenCollector::visit (T &node)
* types implementing `accept_vis` method and for classes for which the
* `visit` method is directly implemented.
*/
- template <typename T> void visit (std::unique_ptr<T> &node);
+ template <typename T> void visit (std::unique_ptr<T> &node)
+ {
+ node->accept_vis (*this);
+ }
/**
* @see visit<std::unique_ptr<T>>