Quantcast
Channel: Get templated, template type - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Get templated, template type

$
0
0

I am creating a small 'generic' pathfinding class which takes a class type of Board on which it will be finding paths,

//T - Board class typetemplate<class T>class PathFinder{...}

Whereas Board is also templated to hold the node type. (so that i can find paths on 2D or 3D vector spaces).

I would like to be able to declare and define a member function for PathFinder that will take parameters like so

//T - Board class typePathFinder<T>::getPath( nodeType from, nodeType to);

How can I perform the type compatibility for the node type of T and nodeType that is fed into the function as parameter ?


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>