Home Function template specialization with templated typename
Reply: 0

Function template specialization with templated typename

user758
1#
user758 Published in April 27, 2018, 6:52 am

I have a template method in some class

template<typename T> int get(T &value) const {
    ...
}

And several specializations

template<> int AAA::get<int>(int &val) const;
template<> int AAA::get<AAA>(AAA &val) const;

There is a templated type

template<const int SIZE> class BBB{
    ...
};

and I need to specialize my template method with this type.

template<> int AAA::get<BBB<SIZE>>(BBB<SIZE> &val) const;

I know that function template partial specialization is disabled. But maybe there be a solution for this particular case?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.330284 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO