Commit 90866787 authored by Pádraig Brady's avatar Pádraig Brady Committed by Facebook Github Bot

folly: fix make_optional compliation issue with gnu++17

Summary:
This clashes with std::make_optional with -std=gnu++17 giving:
  call of overloaded 'make_optional(std::__cxx11::basic_string<char>)' is ambiguous

Reviewed By: yfeldblum

Differential Revision: D6780579

fbshipit-source-id: fea8c76869e4d9b744fc3182379328a91879b1d2
parent 59cb2ab0
...@@ -88,7 +88,7 @@ Optional<std::string> getThreadName(std::thread::id id) { ...@@ -88,7 +88,7 @@ Optional<std::string> getThreadName(std::thread::id id) {
if (pthread_getname_np(stdTidToPthreadId(id), buf.data(), buf.size()) != 0) { if (pthread_getname_np(stdTidToPthreadId(id), buf.data(), buf.size()) != 0) {
return Optional<std::string>(); return Optional<std::string>();
} }
return make_optional(std::string(buf.data())); return folly::make_optional(std::string(buf.data()));
#else #else
return Optional<std::string>(); return Optional<std::string>();
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment