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

decltype of fun-ptr should use explicit &

Summary: Some compilers may not understand `decltype(function)` when they would understand `decltype(&function)`, in particular, when that function has an exception specification.

Differential Revision: D34000718

fbshipit-source-id: 8adf2846d9ed877109a35a25c79b694cc7ed4e6f
parent 92bff437
...@@ -48,7 +48,7 @@ class StaticSingletonManagerSansRtti { ...@@ -48,7 +48,7 @@ class StaticSingletonManagerSansRtti {
static void* create_(Arg&) noexcept(Noexcept); // no defn; only for decltype static void* create_(Arg&) noexcept(Noexcept); // no defn; only for decltype
template <bool Noexcept> template <bool Noexcept>
using Create = decltype(create_<Noexcept>); using Create = decltype(&create_<Noexcept>);
public: public:
template <bool Noexcept> template <bool Noexcept>
...@@ -62,7 +62,7 @@ class StaticSingletonManagerSansRtti { ...@@ -62,7 +62,7 @@ class StaticSingletonManagerSansRtti {
} }
private: private:
Create<Noexcept>* create; Create<Noexcept> create;
}; };
template <typename T, typename Tag> template <typename T, typename Tag>
...@@ -125,7 +125,7 @@ class StaticSingletonManagerWithRtti { ...@@ -125,7 +125,7 @@ class StaticSingletonManagerWithRtti {
FOLLY_NOINLINE static void* create_(Arg&) noexcept(Noexcept); FOLLY_NOINLINE static void* create_(Arg&) noexcept(Noexcept);
template <bool Noexcept> template <bool Noexcept>
using Create = decltype(create_<Noexcept>); using Create = decltype(&create_<Noexcept>);
public: public:
template <bool Noexcept> template <bool Noexcept>
...@@ -139,7 +139,7 @@ class StaticSingletonManagerWithRtti { ...@@ -139,7 +139,7 @@ class StaticSingletonManagerWithRtti {
} }
private: private:
Create<Noexcept>* create; Create<Noexcept> create;
}; };
template <typename T, typename Tag> template <typename T, typename Tag>
......
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