|
|
6e52e0 |
diff -up boost_1_53_0/boost/lexical_cast.hpp\~ boost_1_53_0/boost/lexical_cast.hpp
|
|
|
6e52e0 |
--- /boost_1_53_0/boost/lexical_cast.hpp~ 2014-09-15 15:36:36.915684568 +0200
|
|
|
6e52e0 |
+++ /boost_1_53_0/boost/lexical_cast.hpp 2014-09-15 15:43:54.086756641 +0200
|
|
|
6e52e0 |
@@ -2404,16 +2404,57 @@ namespace boost {
|
|
|
6e52e0 |
return caster_type::lexical_cast_impl(arg);
|
|
|
6e52e0 |
}
|
|
|
6e52e0 |
|
|
|
6e52e0 |
- template <typename Target, typename CharType>
|
|
|
6e52e0 |
- inline Target lexical_cast(const CharType* chars, std::size_t count)
|
|
|
6e52e0 |
+ template <typename Target>
|
|
|
6e52e0 |
+ inline Target lexical_cast(const char* chars, std::size_t count)
|
|
|
6e52e0 |
+ {
|
|
|
6e52e0 |
+ return ::boost::lexical_cast<Target>(
|
|
|
6e52e0 |
+ ::boost::iterator_range<const char*>(chars, chars + count)
|
|
|
6e52e0 |
+ );
|
|
|
6e52e0 |
+ }
|
|
|
6e52e0 |
+
|
|
|
6e52e0 |
+ template <typename Target>
|
|
|
6e52e0 |
+ inline Target lexical_cast(const unsigned char* chars, std::size_t count)
|
|
|
6e52e0 |
{
|
|
|
6e52e0 |
- BOOST_STATIC_ASSERT_MSG(boost::detail::is_char_or_wchar<CharType>::value,
|
|
|
6e52e0 |
- "CharType must be a character or wide character type");
|
|
|
6e52e0 |
+ return ::boost::lexical_cast<Target>(
|
|
|
6e52e0 |
+ ::boost::iterator_range<const unsigned char*>(chars, chars + count)
|
|
|
6e52e0 |
+ );
|
|
|
6e52e0 |
+ }
|
|
|
6e52e0 |
|
|
|
6e52e0 |
- return boost::lexical_cast<Target>(
|
|
|
6e52e0 |
- boost::iterator_range<const CharType*>(chars, chars + count)
|
|
|
6e52e0 |
+ template <typename Target>
|
|
|
6e52e0 |
+ inline Target lexical_cast(const signed char* chars, std::size_t count)
|
|
|
6e52e0 |
+ {
|
|
|
6e52e0 |
+ return ::boost::lexical_cast<Target>(
|
|
|
6e52e0 |
+ ::boost::iterator_range<const signed char*>(chars, chars + count)
|
|
|
6e52e0 |
+ );
|
|
|
6e52e0 |
+ }
|
|
|
6e52e0 |
+
|
|
|
6e52e0 |
+#ifndef BOOST_LCAST_NO_WCHAR_T
|
|
|
6e52e0 |
+ template <typename Target>
|
|
|
6e52e0 |
+ inline Target lexical_cast(const wchar_t* chars, std::size_t count)
|
|
|
6e52e0 |
+ {
|
|
|
6e52e0 |
+ return ::boost::lexical_cast<Target>(
|
|
|
6e52e0 |
+ ::boost::iterator_range<const wchar_t*>(chars, chars + count)
|
|
|
6e52e0 |
);
|
|
|
6e52e0 |
}
|
|
|
6e52e0 |
+#endif
|
|
|
6e52e0 |
+#ifndef BOOST_NO_CHAR16_T
|
|
|
6e52e0 |
+ template <typename Target>
|
|
|
6e52e0 |
+ inline Target lexical_cast(const char16_t* chars, std::size_t count)
|
|
|
6e52e0 |
+ {
|
|
|
6e52e0 |
+ return ::boost::lexical_cast<Target>(
|
|
|
6e52e0 |
+ ::boost::iterator_range<const char16_t*>(chars, chars + count)
|
|
|
6e52e0 |
+ );
|
|
|
6e52e0 |
+ }
|
|
|
6e52e0 |
+#endif
|
|
|
6e52e0 |
+#ifndef BOOST_NO_CHAR32_T
|
|
|
6e52e0 |
+ template <typename Target>
|
|
|
6e52e0 |
+ inline Target lexical_cast(const char32_t* chars, std::size_t count)
|
|
|
6e52e0 |
+ {
|
|
|
6e52e0 |
+ return ::boost::lexical_cast<Target>(
|
|
|
6e52e0 |
+ ::boost::iterator_range<const char32_t*>(chars, chars + count)
|
|
|
6e52e0 |
+ );
|
|
|
6e52e0 |
+ }
|
|
|
6e52e0 |
+#endif
|
|
|
6e52e0 |
|
|
|
6e52e0 |
} // namespace boost
|
|
|
6e52e0 |
|