fork(18) download
  1. #include <cstddef>
  2.  
  3. template<int Index, typename Tpl>
  4. std::size_t CalcInterleaveByteOffset(const Tpl &t)
  5. {
  6. std::size_t prevOffset = CalcInterleaveByteOffset<Index - 1>(t);
  7. return prevOffset + sizeof(Tpl);
  8. }
  9.  
  10. template<typename Tpl>
  11. std::size_t CalcInterleaveByteOffset<0, Tpl>(const Tpl &t)
  12. {
  13. return 0;
  14. }
  15.  
  16. int main() {return 0;}
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:11: error: function template partial specialization ‘CalcInterleaveByteOffset<0, Tpl>’ is not allowed
stdout
Standard output is empty