From: Pádraig Brady Date: Tue, 23 Jan 2018 18:47:49 +0000 (-0800) Subject: folly: fix make_optional compliation issue with gnu++17 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=908667879945d22a2f026559cbd4c5d9cc0bebaa;ds=sidebyside 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)' is ambiguous Reviewed By: yfeldblum Differential Revision: D6780579 fbshipit-source-id: fea8c76869e4d9b744fc3182379328a91879b1d2 --- diff --git a/folly/system/ThreadName.cpp b/folly/system/ThreadName.cpp index ae433cc8..d661ad02 100644 --- a/folly/system/ThreadName.cpp +++ b/folly/system/ThreadName.cpp @@ -88,7 +88,7 @@ Optional getThreadName(std::thread::id id) { if (pthread_getname_np(stdTidToPthreadId(id), buf.data(), buf.size()) != 0) { return Optional(); } - return make_optional(std::string(buf.data())); + return folly::make_optional(std::string(buf.data())); #else return Optional(); #endif