Tatooine
has_fields_available_method.h
Go to the documentation of this file.
1#ifndef TATOOINE_HAS_FIELDS_AVAILABLE_METHOD_H
2#define TATOOINE_HAS_FIELDS_AVAILABLE_METHOD_H
3//==============================================================================
4#include <type_traits>
5//==============================================================================
6namespace tatooine {
7//==============================================================================
8template <typename T, typename Void = void>
9struct has_fields_available_method_impl : std::false_type {};
10//------------------------------------------------------------------------------
11template <typename T>
13 T, decltype(std::declval<T>().fields_available)> : std::true_type {};
14//==============================================================================
15template <typename T>
18}
19//------------------------------------------------------------------------------
20template <typename T>
21constexpr auto has_fields_available_method(T&& t) {
22 return has_fields_available_method<T>();
23}
24//==============================================================================
25} // namespace tatooine
26//==============================================================================
27#endif
Definition: algorithm.h:6
constexpr auto has_fields_available_method()
Definition: has_fields_available_method.h:16
Definition: has_fields_available_method.h:9