如果你的编译环境和我一样,然后又在用C++11的时候,不小心直接或者间接用到了<chrono>这个头文件,应该就会遇到这个bug。 完整的错误信息如下: || In file included from /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/thread:37: /usr/include/c++/4.6/chrono|240 col 10| error: cannot cast from lvalue of type ‘const long’ to rvalue reference type ‘rep’ (aka ‘long &&’); types are not compatible || : __r(static_cast(__rep)) { } || ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/4.6/chrono|128 col 13| note: in instantiation of function template specialization ‘std::chrono::duration >::duration’ requested here || return […]