Skip to content

Instantly share code, notes, and snippets.

@proller
Last active August 29, 2015 14:01
Show Gist options
  • Select an option

  • Save proller/dcf6f4c2542b1fb724d0 to your computer and use it in GitHub Desktop.

Select an option

Save proller/dcf6f4c2542b1fb724d0 to your computer and use it in GitHub Desktop.
c++1y
#include <shared_mutex>
int main(int argc, char *argv[]) {
std::shared_timed_mutex m;
std::shared_lock<std::shared_timed_mutex> lock(m);
lock.unlock();
return 0;
}
//ok:
// gcc49 -std=c++1y -lstdc++ a.cpp
//not ok:
// cd /usr/ports/devel/libc++ && make install clean
// clang-devel -std=c++1y -I/usr/local/include/c++/v1 -L/usr/local/lib -lc++ a.cpp
//run: a.out: Undefined symbol "_ZNSt3__118shared_timed_mutexC1Ev"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment