Commit 456e7d04 authored by Dominik Charousset's avatar Dominik Charousset

Merge pull request #333 from ufownl/topic/fix_has_name

Fix `has_name`
parents f4fa23d1 a79fcc5a
...@@ -463,7 +463,7 @@ struct is_optional<optional<T>> : std::true_type { ...@@ -463,7 +463,7 @@ struct is_optional<optional<T>> : std::true_type {
}; };
// Checks whether T has a member variable named `name`. // Checks whether T has a member variable named `name`.
template <class T> template <class T, bool IsScalar = std::is_scalar<T>::value>
class has_name { class has_name {
private: private:
// a simple struct with a member called `name` // a simple struct with a member called `name`
...@@ -487,6 +487,12 @@ public: ...@@ -487,6 +487,12 @@ public:
static constexpr bool value = sizeof(fun(static_cast<derived*>(nullptr))) > 1; static constexpr bool value = sizeof(fun(static_cast<derived*>(nullptr))) > 1;
}; };
template <class T>
class has_name<T, true> {
public:
static constexpr bool value = false;
};
} // namespace detail } // namespace detail
} // namespace caf } // namespace caf
......
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