DxLibEx
use_big_type_when_one_byte_t.hpp
Go to the documentation of this file.
1 /*=============================================================================
2  Copyright (C) 2015-2017 DxLibEx project
3  https://github.com/Nagarei/DxLibEx/
4 
5  Distributed under the Boost Software License, Version 1.0.
6  (See http://www.boost.org/LICENSE_1_0.txt)
7 =============================================================================*/
8 #ifndef DXLE_INC_BASIC_TYPES_ARTHMETIC_T_HPP_
9 #define DXLE_INC_BASIC_TYPES_ARTHMETIC_T_HPP_
12 namespace dxle {
13  namespace detail {
14  template<typename T, bool is_arithmetic>
16  using type = T;
17  };
18  template<typename T>
20  enable_if<1 != sizeof(T), T>,
21  enable_if<std::is_signed<T>::value, int>,
22  unsigned int
23  >
24  {};
25  }
26  template<typename T>
27  struct use_big_type_when_one_byte : dxle::detail::use_big_type_when_one_byte_impl<T, std::is_arithmetic<T>::value> {};
29  template<typename T>
31 }
32 #endif //DXLE_INC_BASIC_TYPES_ARTHMETIC_T_HPP_
multi-conditional if struct for TMP. This class is used in conjunction with std::enable_if.
typename use_big_type_when_one_byte< T >::type use_big_type_when_one_byte_t
for int8_t/uint8_t
Definition: cast_if.hpp:12