Skip to content

Commit

Permalink
CMT_HAS_DATA_SIZE
Browse files Browse the repository at this point in the history
  • Loading branch information
dancazarin committed Feb 5, 2024
1 parent 242e984 commit f0839dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/kfr/cometa.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,10 @@ constexpr inline bool has_begin_end = details::has_begin_end_impl<std::decay_t<T
template <typename T>
constexpr inline bool has_data_size = details::has_data_size_impl<std::decay_t<T>>::value;

#define CMT_HAS_DATA_SIZE(CONTAINER) \
std::void_t<decltype(std::size(std::declval<CONTAINER>())), \
decltype(std::data(std::declval<CONTAINER>()))>* = nullptr

template <typename T>
using value_type_of = typename std::decay_t<T>::value_type;

Expand Down

0 comments on commit f0839dc

Please sign in to comment.