#ifndef MOJO_PUBLIC_CPP_BINDINGS_CLONE_TRAITS_H_
#define MOJO_PUBLIC_CPP_BINDINGS_CLONE_TRAITS_H_
#include <optional>
#include <type_traits>
#include <utility>
#include <vector>
#include "base/containers/flat_map.h"
#include "mojo/public/cpp/bindings/lib/template_util.h"
namespace mojo {
template <typename T, typename SFINAE = void>
struct HasCloneMethod : std ::false_type { … };
HasCloneMethod<T, std::void_t<decltype(std::declval<const T &>().Clone())>>;
template <typename T>
T Clone(const T& input);
template <typename T>
struct CloneTraits { … };
CloneTraits<std::optional<T>>;
CloneTraits<std::vector<T>>;
CloneTraits<base::flat_map<K, V>>;
template <typename T>
T Clone(const T& input) { … }
}
#endif