diff --git a/source/tinystl/experimental/type_traits.h b/source/tinystl/experimental/type_traits.h new file mode 100644 index 0000000..3c0c119 --- /dev/null +++ b/source/tinystl/experimental/type_traits.h @@ -0,0 +1,62 @@ +#pragma once + +#include "tinystl/type_traits/integral_constant.h" +#include "tinystl/type_traits/void_t.h" +#include "tinystl/type_traits/is_same.h" +#include "tinystl/type_traits/is_convertible.h" + +namespace detail { +template < + class Default, class AlwaysVoid, template class Op, class... Args> +struct detector { + using value_t = tinystl::false_type; + using type = Default; +}; + +template class Op, class... Args> +struct detector>, Op, Args...> { + using value_t = tinystl::true_type; + using type = Op; +}; +} // namespace detail + +namespace tinystl { + +struct nonesuch { + ~nonesuch() = delete; + nonesuch(nonesuch const &) = delete; + void operator=(nonesuch const &) = delete; +}; + +template