diff --git a/sprout/algorithm/string/join.hpp b/sprout/algorithm/string/join.hpp index acb665c5..eb9c3842 100644 --- a/sprout/algorithm/string/join.hpp +++ b/sprout/algorithm/string/join.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include namespace sprout { namespace algorithm { @@ -22,7 +22,7 @@ namespace sprout { template struct string_size< String, - typename std::enable_if::value>::type + typename std::enable_if::value>::type > : public std::integral_constant< typename sprout::container_traits::size_type, @@ -32,7 +32,7 @@ namespace sprout { template struct string_size< String, - typename std::enable_if::value>::type + typename std::enable_if::value>::type > : public std::integral_constant< typename sprout::container_traits::size_type, @@ -42,7 +42,7 @@ namespace sprout { template< typename String, - typename sprout::enabler_if::value>::type = sprout::enabler + typename sprout::enabler_if::value>::type = sprout::enabler > inline SPROUT_CONSTEXPR typename sprout::container_traits::difference_type str_size(String const& str) { @@ -50,7 +50,7 @@ namespace sprout { } template< typename String, - typename sprout::enabler_if::value>::type = sprout::enabler + typename sprout::enabler_if::value>::type = sprout::enabler > inline SPROUT_CONSTEXPR typename sprout::container_traits::difference_type str_size(String const& str) { diff --git a/sprout/io.hpp b/sprout/io.hpp index 97d5e5f8..d2fc7a4b 100644 --- a/sprout/io.hpp +++ b/sprout/io.hpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT @@ -676,7 +676,7 @@ namespace sprout { typename Elem, std::size_t N, typename T, typename sprout::enabler_if< std::is_integral::value - && !sprout::weed::traits::is_char_type::value + && !sprout::is_char_type::value >::type = sprout::enabler > inline SPROUT_CONSTEXPR auto @@ -697,7 +697,7 @@ namespace sprout { } template< typename Elem, std::size_t N, typename T, - typename sprout::enabler_if::value>::type = sprout::enabler + typename sprout::enabler_if::value>::type = sprout::enabler > inline SPROUT_CONSTEXPR auto eval(sprout::io::format_holder const& holder) diff --git a/sprout/iterator/counting_iterator.hpp b/sprout/iterator/counting_iterator.hpp index 727adf7e..dbde1e97 100644 --- a/sprout/iterator/counting_iterator.hpp +++ b/sprout/iterator/counting_iterator.hpp @@ -1,7 +1,7 @@ #ifndef SPROUT_ITERATOR_COUNTING_ITERATOR_HPP #define SPROUT_ITERATOR_COUNTING_ITERATOR_HPP -#include +#include #include #include #include @@ -34,7 +34,9 @@ namespace sprout { value_type current_; private: public: - counting_iterator() = default; + SPROUT_CONSTEXPR counting_iterator() + : current_(std::numeric_limits::max()) + {} counting_iterator(counting_iterator const&) = default; explicit SPROUT_CONSTEXPR counting_iterator(value_type const& v) : current_(v) diff --git a/sprout/pit.hpp b/sprout/pit.hpp index f21914c9..8a80edb1 100644 --- a/sprout/pit.hpp +++ b/sprout/pit.hpp @@ -10,6 +10,7 @@ #include #include #include +#include namespace sprout { // @@ -210,6 +211,20 @@ namespace sprout { > type; }; }; + + // + // blank + // + struct blank {}; + + // + // blank_pit + // + template + inline SPROUT_CONSTEXPR sprout::pit > + blank_pit() { + return sprout::pit >(); + } } // namespace sprout namespace std { diff --git a/sprout/range/adaptor.hpp b/sprout/range/adaptor.hpp index 7f9d5938..56ee0a14 100644 --- a/sprout/range/adaptor.hpp +++ b/sprout/range/adaptor.hpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include diff --git a/sprout/range/adaptor/counting.hpp b/sprout/range/adaptor/counting.hpp index ccd2d6c7..c6217248 100644 --- a/sprout/range/adaptor/counting.hpp +++ b/sprout/range/adaptor/counting.hpp @@ -1,7 +1,6 @@ #ifndef SPROUT_RANGE_ADAPTOR_COUNTING_HPP #define SPROUT_RANGE_ADAPTOR_COUNTING_HPP -#include #include #include #include @@ -85,7 +84,7 @@ namespace sprout { explicit SPROUT_CONSTEXPR counting_range(value_type const& first) : base_type( iterator(first), - iterator(std::numeric_limits::max()) + iterator() ) {} SPROUT_CONSTEXPR counting_range( diff --git a/sprout/type_traits.hpp b/sprout/type_traits.hpp index 45d0d21e..621e9d11 100644 --- a/sprout/type_traits.hpp +++ b/sprout/type_traits.hpp @@ -4,9 +4,10 @@ #include #include #include +#include +#include #include #include #include -#include #endif // #ifndef SPROUT_TYPE_TRAITS_HPP diff --git a/sprout/type_traits/is_c_str.hpp b/sprout/type_traits/is_c_str.hpp new file mode 100644 index 00000000..cb7859cf --- /dev/null +++ b/sprout/type_traits/is_c_str.hpp @@ -0,0 +1,61 @@ +#ifndef SPROUT_TYPE_TRAITS_IS_C_STR_HPP +#define SPROUT_TYPE_TRAITS_IS_C_STR_HPP + +#include +#include + +namespace sprout { + // + // is_c_str + // + template + struct is_c_str + : public std::false_type + {}; + template + struct is_c_str + : public sprout::is_c_str + {}; + template + struct is_c_str + : public sprout::is_c_str + {}; + template + struct is_c_str + : public sprout::is_c_str + {}; + template + struct is_c_str + : public std::true_type + {}; + template + struct is_c_str + : public std::true_type + {}; + template + struct is_c_str + : public std::true_type + {}; + template + struct is_c_str + : public std::true_type + {}; + template + struct is_c_str + : public std::true_type + {}; + template + struct is_c_str + : public std::true_type + {}; + template + struct is_c_str + : public std::true_type + {}; + template + struct is_c_str + : public std::true_type + {}; +} // namespace sprout + +#endif // #ifndef SPROUT_TYPE_TRAITS_IS_C_STR_HPP diff --git a/sprout/type_traits/is_char_type.hpp b/sprout/type_traits/is_char_type.hpp new file mode 100644 index 00000000..7c9e3486 --- /dev/null +++ b/sprout/type_traits/is_char_type.hpp @@ -0,0 +1,45 @@ +#ifndef SPROUT_TYPE_TRAITS_IS_CHAR_TYPE_HPP +#define SPROUT_TYPE_TRAITS_IS_CHAR_TYPE_HPP + +#include +#include + +namespace sprout { + // + // is_char_type + // + template + struct is_char_type + : public std::false_type + {}; + template + struct is_char_type + : public sprout::is_char_type + {}; + template + struct is_char_type + : public sprout::is_char_type + {}; + template + struct is_char_type + : public sprout::is_char_type + {}; + template<> + struct is_char_type + : public std::true_type + {}; + template<> + struct is_char_type + : public std::true_type + {}; + template<> + struct is_char_type + : public std::true_type + {}; + template<> + struct is_char_type + : public std::true_type + {}; +} // namespace sprout + +#endif // #ifndef SPROUT_TYPE_TRAITS_IS_CHAR_TYPE_HPP diff --git a/sprout/weed/traits/type/is_c_str.hpp b/sprout/weed/traits/type/is_c_str.hpp index 24bbf5f7..9ba5b71b 100644 --- a/sprout/weed/traits/type/is_c_str.hpp +++ b/sprout/weed/traits/type/is_c_str.hpp @@ -1,8 +1,8 @@ #ifndef SPROUT_WEED_TRAITS_TYPE_IS_C_STR_HPP #define SPROUT_WEED_TRAITS_TYPE_IS_C_STR_HPP -#include #include +#include namespace sprout { namespace weed { @@ -12,51 +12,7 @@ namespace sprout { // template struct is_c_str - : public std::false_type - {}; - template - struct is_c_str - : public sprout::weed::traits::is_c_str - {}; - template - struct is_c_str - : public sprout::weed::traits::is_c_str - {}; - template - struct is_c_str - : public sprout::weed::traits::is_c_str - {}; - template - struct is_c_str - : public std::true_type - {}; - template - struct is_c_str - : public std::true_type - {}; - template - struct is_c_str - : public std::true_type - {}; - template - struct is_c_str - : public std::true_type - {}; - template - struct is_c_str - : public std::true_type - {}; - template - struct is_c_str - : public std::true_type - {}; - template - struct is_c_str - : public std::true_type - {}; - template - struct is_c_str - : public std::true_type + : public sprout::is_c_str {}; } // namespace traits } // namespace weed diff --git a/sprout/weed/traits/type/is_char_type.hpp b/sprout/weed/traits/type/is_char_type.hpp index b0e8e8b3..c23d109a 100644 --- a/sprout/weed/traits/type/is_char_type.hpp +++ b/sprout/weed/traits/type/is_char_type.hpp @@ -1,8 +1,8 @@ #ifndef SPROUT_WEED_TRAITS_TYPE_IS_CHAR_TYPE_HPP #define SPROUT_WEED_TRAITS_TYPE_IS_CHAR_TYPE_HPP -#include #include +#include namespace sprout { namespace weed { @@ -12,35 +12,7 @@ namespace sprout { // template struct is_char_type - : public std::false_type - {}; - template - struct is_char_type - : public sprout::weed::traits::is_char_type - {}; - template - struct is_char_type - : public sprout::weed::traits::is_char_type - {}; - template - struct is_char_type - : public sprout::weed::traits::is_char_type - {}; - template<> - struct is_char_type - : public std::true_type - {}; - template<> - struct is_char_type - : public std::true_type - {}; - template<> - struct is_char_type - : public std::true_type - {}; - template<> - struct is_char_type - : public std::true_type + : public sprout::is_char_type {}; } // namespace traits } // namespace weed