Home Explicit member function specialisation
Reply: 0

Explicit member function specialisation

user661
1#
user661 Published in April 25, 2018, 6:07 pm

I am unable to specialize the template member function below. I have looked at the solution given to answer similar question on SOF but the solution that is proposed is same as the code I have below but it does not seem to work. I am missing something for sure.

    enum EStep
    {
         eStep1, eStep2, eStep3
    };
    template<int16_t iDevice>
    struct Device
    {
        template<EStep step>
        static constexpr bool isType() { return false; }
    };

    template<> template<>
    constexpr bool Device<int16_t>::isType<eStep1>()
    {
        return true;
    }
You need to login account before you can post.

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

© 2016 Powered by mzan.com design MATCHINFO