Commit f6fe0618 authored by Dominik Charousset's avatar Dominik Charousset

Allow using deep_to_string_t as inspector

parent db299ded
...@@ -38,9 +38,16 @@ std::string deep_to_string(const Ts&... xs) { ...@@ -38,9 +38,16 @@ std::string deep_to_string(const Ts&... xs) {
return result; return result;
} }
/// Wrapper to `deep_to_string` for using the function as an inspector.
struct deep_to_string_t { struct deep_to_string_t {
using result_type = std::string;
static constexpr bool reads_state = true;
static constexpr bool writes_state = false;
template <class... Ts> template <class... Ts>
std::string operator()(const Ts&... xs) const { result_type operator()(const Ts&... xs) const {
return deep_to_string(xs...); return deep_to_string(xs...);
} }
}; };
......
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