1
Możliwy błąd kompilatora w MSVC
Poniższy kod kompiluje się z gcc i clang (i wieloma innymi kompilatorami C ++ 11) #include <stdint.h> typedef int datatype; template <typename T> struct to_datatype {}; template <> struct to_datatype<int16_t> { static constexpr datatype value = 1; }; template <typename T> class data { public: data(datatype dt = to_datatype<T>::value) {} …
13
c++
c++11
visual-c++