ft_containers/containers/iterators/is_integral.hpp
2022-11-20 03:00:39 +01:00

32 lines
2.0 KiB
C++

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* is_integral.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/19 10:55:07 by apommier #+# #+# */
/* Updated: 2022/11/19 10:55:51 by apommier ### ########.fr */
/* */
/* ************************************************************************** */
#pragma once
namespace ft
{
template <class T> struct is_integral { static const bool value = false; };
template <> struct is_integral<bool> { static const bool value = true; };
template <> struct is_integral<char> { static const bool value = true; };
template <> struct is_integral<signed char> { static const bool value = true; };
template <> struct is_integral<unsigned char> { static const bool value = true; };
template <> struct is_integral<wchar_t> { static const bool value = true; };
template <> struct is_integral<short> { static const bool value = true; };
template <> struct is_integral<int> { static const bool value = true; };
template <> struct is_integral<long> { static const bool value = true; };
template <> struct is_integral<long long> { static const bool value = true; };
template <> struct is_integral<unsigned short> { static const bool value = true; };
template <> struct is_integral<unsigned int> { static const bool value = true; };
template <> struct is_integral<unsigned long> { static const bool value = true; };
template <> struct is_integral<unsigned long long> { static const bool value = true; };
}