26 #ifndef TILEDARRAY_TILE_INTERFACE_CLONE_H__INCLUDED
27 #define TILEDARRAY_TILE_INTERFACE_CLONE_H__INCLUDED
29 #include "../tile_interface/cast.h"
30 #include "../type_traits.h"
39 template <
typename Arg>
40 inline auto clone(
const Arg& arg) {
44 namespace tile_interface {
50 typename std::decay<decltype(clone(std::declval<T>()))>::type;
58 template <
typename Arg,
typename Enabler =
void>
69 template <
typename Arg>
70 struct clone_trait<Arg, typename std::enable_if<TiledArray::detail::is_type<
71 result_of_clone_t<Arg> >::value>
::type> {
81 template <
typename Result,
typename Arg,
typename Enabler =
void>
99 template <
typename Result,
typename Arg>
101 typename std::enable_if<!std::is_same<
102 Result, typename clone_trait<Arg>::type>::value>::type>
115 template <
typename Arg>
127 template <
typename Result,
typename Arg>
132 #endif // TILEDARRAY_TILE_INTERFACE_CLONE_H__INCLUDED