ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Понедельник
20 мая
297394 Топик полностью
Скрипач, пророк (07.01.2012 13:00 - 13:09, просмотров: 147) ответил diper на Ня
Спасибо. А почему тогда не проходит во это:  template <typename T, data_id_t t, int subtype> class strict{ T val; public: explicit strict(T init_val=0) : val(init_val) { } strict operator+(const strict b){ return strict(val + b.val);} strict operator-(const strict b){ return strict(val - b.val);} strict operator/(const T b){ return strict(val / b);} T operator/(const strict b){ return val / RAW_VALUE(b);} friend strict operator*(const strict a, const T b){ return strict(a.val * b);} friend strict operator*(const T b, const strict a){ return strict(a.val * b);} friend T VAL(strict a);//{ return a.val; }; }; template <typename T, data_id_t t, int subtype> T VAL(strict<T, t, subtype> a){ return a.val; } // !!??
... но не любой ценой.