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