FS#27838 - Functions std::this_thread namespace doesn't provide, missing a option when use ./configure
Attached to Project:
Arch Linux
Opened by Victor Hiairrassary (mecanix) - Thursday, 05 January 2012, 14:41 GMT
Last edited by Allan McRae (Allan) - Monday, 23 January 2012, 21:59 GMT
Opened by Victor Hiairrassary (mecanix) - Thursday, 05 January 2012, 14:41 GMT
Last edited by Allan McRae (Allan) - Monday, 23 January 2012, 21:59 GMT
|
Details
Description: Impossible to use functions in std::this_thread
namespace, like sleep_for for example.
For this you must add --enable-libstdcxx-time=yes when configure gcc before compiling. More informations on --enable-libstdcxx-time : http://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html Additional info: * package version(s) : all gcc that include thread c++0x support Steps to reproduce: Try to compile this : #include<thread> void f() { std::this_thread::sleep_for(std::chrono::seconds(3)); } int main() { std::thread t(f); t.join(); } |
This task depends upon
Closed by Allan McRae (Allan)
Monday, 23 January 2012, 21:59 GMT
Reason for closing: Implemented
Additional comments about closing: gcc-4.6.2-6 in [testing]
Monday, 23 January 2012, 21:59 GMT
Reason for closing: Implemented
Additional comments about closing: gcc-4.6.2-6 in [testing]
Now I use -D_GLIBCXX_USE_NANOSLEEP, but a program mustn't know it.. It's a implementation-define no, isn't it?
This is the same things for threads support : currently, there is --enable-threads=posix, otherwise we must use -D_GLIBCXX_HAS_GTHREADS and -D_GLIBCXX_USE_C99_STDINT_TR1