Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c:\work\c++>clang++ --analyze -std=c++11 test.cpp
- In file included from test.cpp:4:
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:240:10: error: cannot cast from lvalue of type 'const long long' to
- rvalue reference type 'rep' (aka 'long long &&'); types are not compatible
- : __r(static_cast<rep>(__rep)) { }
- ^~~~~~~~~~~~~~~~~~~~~~~
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:128:13: note: in instantiation of function template specialization
- 'std::chrono::duration<long long &&, std::ratio<1, 1000000> >::duration<long long, void>' requested here
- return _ToDur(static_cast<__to_rep>(__d.count()));
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:182:9: note: in instantiation of function template specialization
- 'std::chrono::__duration_cast_impl<std::chrono::duration<long long &&, std::ratio<1, 1000000>>, std::ratio<1, 1>,
- long long &&, true, true>::__cast<long long, std::ratio<1, 1000000> >' requested here
- return __dc::__cast(__d);
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:247:10: note: in instantiation of function template specialization
- 'std::chrono::duration_cast<std::chrono::duration<long long &&, std::ratio<1, 1000000>>, long long, std::ratio<1,
- 1000000> >' requested here
- : __r(duration_cast<duration>(__d).count()) { }
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:466:9: note: in instantiation of function template specialization
- 'std::chrono::duration<long long &&, std::ratio<1, 1000000> >::duration<long long, std::ratio<1, 1000000>, void>'
- requested here
- return __ct(__lhs).count() < __ct(__rhs).count();
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:667:7: note: in instantiation of function template specialization
- 'std::chrono::operator<<long long, std::ratio<1, 1000000>, long long, std::ratio<1, 1000000> >' requested here
- < system_clock::duration::zero(),
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:128:13: error: call to implicitly-deleted copy constructor of
- 'std::chrono::duration<long long &&, std::ratio<1, 1000000>>'
- return _ToDur(static_cast<__to_rep>(__d.count()));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:182:9: note: in instantiation of function template specialization
- 'std::chrono::__duration_cast_impl<std::chrono::duration<long long &&, std::ratio<1, 1000000>>, std::ratio<1, 1>,
- long long &&, true, true>::__cast<long long, std::ratio<1, 1000000> >' requested here
- return __dc::__cast(__d);
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:247:10: note: in instantiation of function template specialization
- 'std::chrono::duration_cast<std::chrono::duration<long long &&, std::ratio<1, 1000000>>, long long, std::ratio<1,
- 1000000> >' requested here
- : __r(duration_cast<duration>(__d).count()) { }
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:466:9: note: in instantiation of function template specialization
- 'std::chrono::duration<long long &&, std::ratio<1, 1000000> >::duration<long long, std::ratio<1, 1000000>, void>'
- requested here
- return __ct(__lhs).count() < __ct(__rhs).count();
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:667:7: note: in instantiation of function template specialization
- 'std::chrono::operator<<long long, std::ratio<1, 1000000>, long long, std::ratio<1, 1000000> >' requested here
- < system_clock::duration::zero(),
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:233:12: note: explicitly defaulted function was implicitly deleted
- here
- constexpr duration(const duration&) = default;
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:349:6: note: copy constructor of 'duration<long long &&, std::ratio<1,
- 1000000> >' is implicitly deleted because field '__r' is of rvalue reference type 'rep' (aka 'long long &&')
- rep __r;
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:182:9: error: call to implicitly-deleted copy constructor of 'typename
- enable_if<__is_duration<duration<long long &&, ratio<1, 1000000>> >::value, duration<long long &&, ratio<1,
- 1000000>> >::type' (aka 'std::chrono::duration<long long &&, std::ratio<1, 1000000>>')
- return __dc::__cast(__d);
- ^~~~~~~~~~~~~~~~~
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:247:10: note: in instantiation of function template specialization
- 'std::chrono::duration_cast<std::chrono::duration<long long &&, std::ratio<1, 1000000>>, long long, std::ratio<1,
- 1000000> >' requested here
- : __r(duration_cast<duration>(__d).count()) { }
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:466:9: note: in instantiation of function template specialization
- 'std::chrono::duration<long long &&, std::ratio<1, 1000000> >::duration<long long, std::ratio<1, 1000000>, void>'
- requested here
- return __ct(__lhs).count() < __ct(__rhs).count();
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:667:7: note: in instantiation of function template specialization
- 'std::chrono::operator<<long long, std::ratio<1, 1000000>, long long, std::ratio<1, 1000000> >' requested here
- < system_clock::duration::zero(),
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:233:12: note: explicitly defaulted function was implicitly deleted
- here
- constexpr duration(const duration&) = default;
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:349:6: note: copy constructor of 'duration<long long &&, std::ratio<1,
- 1000000> >' is implicitly deleted because field '__r' is of rvalue reference type 'rep' (aka 'long long &&')
- rep __r;
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:255:11: error: rvalue reference to type 'long long' cannot bind to
- lvalue of type 'long long'
- { return __r; }
- ^~~
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:247:39: note: in instantiation of member function
- 'std::chrono::duration<long long &&, std::ratio<1, 1000000> >::count' requested here
- : __r(duration_cast<duration>(__d).count()) { }
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:466:9: note: in instantiation of function template specialization
- 'std::chrono::duration<long long &&, std::ratio<1, 1000000> >::duration<long long, std::ratio<1, 1000000>, void>'
- requested here
- return __ct(__lhs).count() < __ct(__rhs).count();
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:667:7: note: in instantiation of function template specialization
- 'std::chrono::operator<<long long, std::ratio<1, 1000000>, long long, std::ratio<1, 1000000> >' requested here
- < system_clock::duration::zero(),
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:666:21: error: static_assert expression is not an integral constant
- expression
- static_assert(system_clock::duration::min()
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:666:21: note: undefined function 'operator<<long long, std::ratio<1,
- 1000000>, long long, std::ratio<1, 1000000> >' cannot be used in a constant expression
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:460:7: note: declared here
- operator<(const duration<_Rep1, _Period1>& __lhs,
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:141:40: error: cannot cast from lvalue of type 'const intmax_t'
- (aka 'const long long') to rvalue reference type 'long long &&'; types are not compatible
- static_cast<_CR>(__d.count()) / static_cast<_CR>(_CF::den)));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:182:9: note: in instantiation of function template specialization
- 'std::chrono::__duration_cast_impl<std::chrono::duration<long long, std::ratio<1, 1>>, std::ratio<1, 1000000>,
- long long &&, true, false>::__cast<long long, std::ratio<1, 1000000> >' requested here
- return __dc::__cast(__d);
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:679:21: note: in instantiation of function template specialization
- 'std::chrono::duration_cast<std::chrono::duration<long long, std::ratio<1, 1>>, long long, std::ratio<1, 1000000>
- >' requested here
- return std::time_t(duration_cast<chrono::seconds>
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:154:40: error: cannot cast from lvalue of type 'const intmax_t'
- (aka 'const long long') to rvalue reference type 'long long &&'; types are not compatible
- static_cast<_CR>(__d.count()) * static_cast<_CR>(_CF::num)));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:182:9: note: in instantiation of function template specialization
- 'std::chrono::__duration_cast_impl<std::chrono::duration<long long, std::ratio<1, 1000000>>, std::ratio<1000000,
- 1>, long long &&, false, true>::__cast<long long, std::ratio<1, 1> >' requested here
- return __dc::__cast(__d);
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:577:22: note: in instantiation of function template specialization
- 'std::chrono::duration_cast<std::chrono::duration<long long, std::ratio<1, 1000000>>, long long, std::ratio<1, 1>
- >' requested here
- return __time_point(duration_cast<_ToDur>(__t.time_since_epoch()));
- ^
- c:/MinGW/lib/gcc/mingw32/4.6.2/include/c++\chrono:687:9: note: in instantiation of function template specialization
- 'std::chrono::time_point_cast<std::chrono::duration<long long, std::ratio<1, 1000000>>, std::chrono::system_clock,
- std::chrono::duration<long long, std::ratio<1, 1>> >' requested here
- return time_point_cast<system_clock::duration>
- ^
- 7 errors generated.
Advertisement
Add Comment
Please, Sign In to add comment