prog.cpp:18:26: error: expected type-specifier
using Time = Clock::time_point;
^
prog.cpp:19:26: error: expected type-specifier
using Duration = Clock::duration;
^
prog.cpp:20:9: error: ‘Time’ does not name a type
Time start_;
^
prog.cpp:25:9: error: ‘Duration’ does not name a type
Duration TimeElapsed() const;
^
prog.cpp: In member function ‘int64_t Timer<Clock>::TimeElapsed_T() const’:
prog.cpp:34:65: error: there are no arguments to ‘TimeElapsed’ that depend on a template parameter, so a declaration of ‘TimeElapsed’ must be available [-fpermissive]
return std::chrono::duration_cast<unit>(TimeElapsed()).count();
^
prog.cpp:34:65: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
prog.cpp: At global scope:
prog.cpp:38:26: error: ‘sys_clock’ is not a member of ‘std::chrono’
using NTimer = Timer<std::chrono::sys_clock>;
^
prog.cpp:38:26: error: ‘sys_clock’ is not a member of ‘std::chrono’
prog.cpp:38:48: error: template argument 1 is invalid
using NTimer = Timer<std::chrono::sys_clock>;
^