#ifndef __GBLIBCPP_BITS_TYPE_TRAITS_IS_ES__
#define __GBLIBCPP_BITS_TYPE_TRAITS_IS_ES__

#include <cstddef>

#include <bits/type_traits/base>

namespace std {

template <typename T>
struct is_array : public false_type {};
template <typename T>
struct is_array<T[]> : public true_type {};
template <typename T, size_t N>
struct is_array<T[N]> : public true_type {};

template <typename T>
inline constexpr bool is_array_v = is_array<T>::value;

template <typename T>
struct is_const : public false_type {};
template <typename T>
struct is_const<T const> : public true_type {};

template <typename T>
inline constexpr bool is_const_v = is_const<T>::value;

template <typename T>
struct is_function : public bool_constant<!is_const_v<const T>> {};
template <typename T>
struct is_function<T&> : public false_type {};
template <typename T>
struct is_function<T&&> : public false_type {};

template <typename T>
inline constexpr bool is_function_v = is_function<T>::value;

} // namespace std

#endif
