Commit f35ba916 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

work around gcc < 7 in UniqueInstance

Summary: Some older versions of gcc cannot deduce the relevant types correctly, and they are still in use in corners of the codebase.

Differential Revision: D28111907

fbshipit-source-id: 0367cb102f450f0f601350308a5831c7fd68f775
parent 3bab334d
......@@ -26,6 +26,9 @@ namespace detail {
class UniqueInstance {
public:
#if __GNUC__ && __GNUC__ < 7 && !__clang__
explicit UniqueInstance(...) noexcept {}
#else
template <template <typename...> class Z, typename... Key, typename... Mapped>
FOLLY_EXPORT explicit UniqueInstance(
tag_t<Z<Key..., Mapped...>>, tag_t<Key...>, tag_t<Mapped...>) noexcept {
......@@ -34,6 +37,7 @@ class UniqueInstance {
auto& global = createGlobal<Value, key_t<Z, Key...>>();
enforce(tmpl, ptrs, sizeof...(Key), sizeof...(Mapped), global);
}
#endif
UniqueInstance(UniqueInstance const&) = delete;
UniqueInstance(UniqueInstance&&) = delete;
......
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