diff --git a/dxlibex/basic_types.hpp b/dxlibex/basic_types.hpp index 2aaa240..7e6160d 100644 --- a/dxlibex/basic_types.hpp +++ b/dxlibex/basic_types.hpp @@ -11,6 +11,7 @@ #include "dxlibex/basic_types/point3d.hpp" #include "dxlibex/basic_types/size.hpp" #include "dxlibex/basic_types/tchar.hpp" +#include "dxlibex/basic_types/bel.hpp" namespace dxle { //operators betwin point_c and size_c diff --git a/dxlibex/basic_types/bel.hpp b/dxlibex/basic_types/bel.hpp new file mode 100644 index 0000000..fe7e15f --- /dev/null +++ b/dxlibex/basic_types/bel.hpp @@ -0,0 +1,24 @@ +/*============================================================================= +Copyright (C) 2015-2016 DxLibEx project +https://github.com/Nagarei/DxLibEx/ + +Distributed under the Boost Software License, Version 1.0. +(See http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef DXLE_INC_BASIC_TYPES_BEL_HPP_ +#define DXLE_INC_BASIC_TYPES_BEL_HPP_ +#include +#include +#include +#include "dxlibex/type_traits/is_ratio.hpp" +#include "dxlibex/type_traits/enable_if.hpp" +namespace dxle { + typedef std::ratio<1, 10000> myrio; + namespace sound_units { + template::value, nullptr_t> = nullptr> + class bel { + + }; + } +} +#endif //DXLE_INC_BASIC_TYPES_BEL_HPP_ diff --git a/dxlibex/type_traits.hpp b/dxlibex/type_traits.hpp index ef250e7..493e78e 100644 --- a/dxlibex/type_traits.hpp +++ b/dxlibex/type_traits.hpp @@ -17,5 +17,6 @@ #include "dxlibex/type_traits/is_nothrow.hpp" #include "dxlibex/type_traits/is_representable.hpp" #include "dxlibex/type_traits/is_well_format.hpp" +#include "dxlibex/type_traits/is_ratio.hpp" #endif//#ifndef DXLE_INC_TYPE_TRAITS_HPP_ diff --git a/dxlibex/type_traits/is_ratio.hpp b/dxlibex/type_traits/is_ratio.hpp new file mode 100644 index 0000000..4a656b2 --- /dev/null +++ b/dxlibex/type_traits/is_ratio.hpp @@ -0,0 +1,17 @@ +/*============================================================================= +Copyright (C) 2015-2016 DxLibEx project +https://github.com/Nagarei/DxLibEx/ + +Distributed under the Boost Software License, Version 1.0. +(See http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef DXLE_INC_TYPE_TRAITS_IS_RATIO_HPP_ +#define DXLE_INC_TYPE_TRAITS_IS_RATIO_HPP_ +#include +#include +#include +namespace dxle { + template struct is_ratio : std::false_type {}; + template struct is_ratio> : std::true_type {}; +} +#endif //DXLE_INC_TYPE_TRAITS_IS_RATIO_HPP_