Quantcast
Channel: handling void type in template - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Answer by Eric for handling void type in template

$
0
0

Not certain this is valid, but:

template<>void Foo<T>( T(*Func)() ) {    // do something first (e.g. some setup)    return tearDown(Func());}template<>T tearDown<T>( T result) {    // do something after    return result;}

Viewing all articles
Browse latest Browse all 5

Trending Articles



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