1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

fix counting_iterator

This commit is contained in:
bolero-MURAKAMI 2012-05-23 19:33:06 +09:00
parent ea22a6ba5c
commit a9da4b2a1f
11 changed files with 141 additions and 89 deletions

View file

@ -1,8 +1,8 @@
#ifndef SPROUT_WEED_TRAITS_TYPE_IS_C_STR_HPP
#define SPROUT_WEED_TRAITS_TYPE_IS_C_STR_HPP
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/type_traits/is_c_str.hpp>
namespace sprout {
namespace weed {
@ -12,51 +12,7 @@ namespace sprout {
//
template<typename T>
struct is_c_str
: public std::false_type
{};
template<typename T>
struct is_c_str<T const>
: public sprout::weed::traits::is_c_str<T>
{};
template<typename T>
struct is_c_str<T volatile>
: public sprout::weed::traits::is_c_str<T>
{};
template<typename T>
struct is_c_str<T const volatile>
: public sprout::weed::traits::is_c_str<T>
{};
template<std::size_t N>
struct is_c_str<char[N]>
: public std::true_type
{};
template<std::size_t N>
struct is_c_str<wchar_t[N]>
: public std::true_type
{};
template<std::size_t N>
struct is_c_str<char16_t[N]>
: public std::true_type
{};
template<std::size_t N>
struct is_c_str<char32_t[N]>
: public std::true_type
{};
template<std::size_t N>
struct is_c_str<char const[N]>
: public std::true_type
{};
template<std::size_t N>
struct is_c_str<wchar_t const[N]>
: public std::true_type
{};
template<std::size_t N>
struct is_c_str<char16_t const[N]>
: public std::true_type
{};
template<std::size_t N>
struct is_c_str<char32_t const[N]>
: public std::true_type
: public sprout::is_c_str<T>
{};
} // namespace traits
} // namespace weed

View file

@ -1,8 +1,8 @@
#ifndef SPROUT_WEED_TRAITS_TYPE_IS_CHAR_TYPE_HPP
#define SPROUT_WEED_TRAITS_TYPE_IS_CHAR_TYPE_HPP
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/type_traits/is_char_type.hpp>
namespace sprout {
namespace weed {
@ -12,35 +12,7 @@ namespace sprout {
//
template<typename T>
struct is_char_type
: public std::false_type
{};
template<typename T>
struct is_char_type<T const>
: public sprout::weed::traits::is_char_type<T>
{};
template<typename T>
struct is_char_type<T volatile>
: public sprout::weed::traits::is_char_type<T>
{};
template<typename T>
struct is_char_type<T const volatile>
: public sprout::weed::traits::is_char_type<T>
{};
template<>
struct is_char_type<char>
: public std::true_type
{};
template<>
struct is_char_type<wchar_t>
: public std::true_type
{};
template<>
struct is_char_type<char16_t>
: public std::true_type
{};
template<>
struct is_char_type<char32_t>
: public std::true_type
: public sprout::is_char_type<T>
{};
} // namespace traits
} // namespace weed