c++0x: error: ‘sleep_for’ is not a member of ‘std::this_thread’
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-4.4 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: gcc-4.4
The following code doesn't compile out of the box with g++ 4.4 on Lucid.
---
#include <thread>
int main(int argc, const char* argv[])
{
}
---
$ g++ sleep_for.cpp -o sleep_for -std=c++0x
sleep_for.cpp: In function ‘int main(int, const char**)’:
sleep_for.cpp:5: error: ‘sleep_for’ is not a member of ‘std::this_thread’
If compiled with an additional define _GLIBCXX_
$ g++ sleep_for.cpp -o sleep_for -std=c++0x -D_GLIBCXX_
The define _GLIBCXX_
This is the case for Ubuntu Lucid, where nanosleep is available.
---
Architecture: amd64
DistroRelease: Ubuntu 10.04
NonfreeKernelMo
Package: gcc-4.4 4.4.3-4ubuntu5
PackageArchitec
ProcEnviron:
LANGUAGE=en_GB:en
PATH=(custom, user)
LANG=en_GB.utf8
SHELL=/bin/bash
Tags: lucid
Uname: Linux 2.6.34-
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare vboxusers
apport information