Language
C++
Compiler
gcc 7.1.0
Options
Warnings
Boost 1.66.0
C++1z(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.66.0/gcc-7.1.0/include -std=gnu++1z
Exit Code:
1
Author
anonymous
about 7 years ago
C++
gcc 7.1.0
Author
anonymous
about 7 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.66.0/gcc-7.1.0/include -std=gnu++1z
In file included from prog.cc:2:0:
/opt/wandbox/gcc-7.1.0/include/c++/7.1.0/chrono: In instantiation of 'constexpr std::chrono::duration<_Rep, _Period>::duration(const _Rep2&) [with _Rep2 = main()::Convert; <template-parameter-2-2> = void; _Rep = long int; _Period = std::ratio<1, 1000>]':
prog.cc:23:40: required from here
/opt/wandbox/gcc-7.1.0/include/c++/7.1.0/chrono:326:10: error: invalid static_cast from type 'const main()::Convert' to type 'std::chrono::duration<long int, std::ratio<1, 1000> >::rep {aka long int}'
: __r(static_cast<rep>(__rep)) { }
^~~~~~~~~~~~~~~~~~~~~~~