http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59554

--- Comment #2 from Pavel <isak50 at mail dot ru> ---
if i edit code so:
template <typename _T>
    void show(_T t)
    {  
        *t = nullptr;    // added 
        printf("----------_T------------\n");
        mis_const<_T>::ch();
        mis_volatile<_T>::ch();
        mis_pointer<_T>::ch();


        printf("------decltype(t)-------\n");
        mis_const<decltype(t)>::ch();
        mis_volatile<decltype(t)>::ch();
        mis_pointer<decltype(t)>::ch();
    }
i receive error:
C:\TDM\msys\1.0\prg\t>make -s
../source.cpp: In instantiation of 'void show(_T) [with _T = const volatile
int*
]':
../source.cpp:43:11:   required from here
../source.cpp:26:12: error: assignment of read-only location '* t'
         *t = nullptr;

Pay attention: [with _T = const volatile int*]

Reply via email to