#include <iostream>
#include <type_traits>

          
struct test
{
    void method() const
    {
        test_const<decltype(this)>();
    }
    
    template<typename T>
    void test_const() const
    {
        std::cout << std::is_const<T>::value << " "
                  << std::is_const<
                        typename std::remove_pointer<T>::type>::value << std::endl;
    }
};

int main()
{
    test t;
    t.test_const<int const* const>();
    t.test_const<int * const>();
    t.test_const<int const* >();
    t.test_const<int *>();
    t.method();
    
    return 0;
}