2013-08-08 09:54:33 +00:00
|
|
|
/*=============================================================================
|
2015-01-10 10:13:57 +00:00
|
|
|
Copyright (c) 2011-2015 Bolero MURAKAMI
|
2013-08-08 09:54:33 +00:00
|
|
|
https://github.com/bolero-MURAKAMI/Sprout
|
|
|
|
|
|
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
=============================================================================*/
|
2011-11-13 08:54:38 +00:00
|
|
|
#ifndef SPROUT_WEED_DETAIL_C_STR_AS_STRING_HPP
|
|
|
|
#define SPROUT_WEED_DETAIL_C_STR_AS_STRING_HPP
|
|
|
|
|
|
|
|
#include <type_traits>
|
|
|
|
#include <sprout/config.hpp>
|
|
|
|
#include <sprout/string.hpp>
|
2013-03-25 03:43:47 +00:00
|
|
|
#include <sprout/type_traits/identity.hpp>
|
2013-05-21 21:49:10 +00:00
|
|
|
#include <sprout/type/void.hpp>
|
2011-11-13 08:54:38 +00:00
|
|
|
|
|
|
|
namespace sprout {
|
|
|
|
namespace weed {
|
|
|
|
namespace detail {
|
|
|
|
template<typename T>
|
2013-05-21 21:49:10 +00:00
|
|
|
struct c_str_as_string
|
|
|
|
: public sprout::identity<sprout::types::void_>
|
|
|
|
{};
|
2013-03-25 03:43:47 +00:00
|
|
|
template<typename T>
|
|
|
|
struct c_str_as_string<T const>
|
|
|
|
: public sprout::weed::detail::c_str_as_string<T>
|
|
|
|
{};
|
|
|
|
template<typename T>
|
|
|
|
struct c_str_as_string<T volatile>
|
|
|
|
: public sprout::weed::detail::c_str_as_string<T>
|
|
|
|
{};
|
|
|
|
template<typename T>
|
|
|
|
struct c_str_as_string<T const volatile>
|
|
|
|
: public sprout::weed::detail::c_str_as_string<T>
|
|
|
|
{};
|
|
|
|
template<typename T, std::size_t N>
|
|
|
|
struct c_str_as_string<T[N]>
|
|
|
|
: public sprout::identity<sprout::basic_string<T, N - 1> >
|
|
|
|
{};
|
|
|
|
template<typename T, std::size_t N>
|
|
|
|
struct c_str_as_string<T const[N]>
|
|
|
|
: public sprout::identity<sprout::basic_string<T, N - 1> >
|
|
|
|
{};
|
|
|
|
template<typename T, std::size_t N>
|
|
|
|
struct c_str_as_string<T volatile[N]>
|
|
|
|
: public sprout::identity<sprout::basic_string<T, N - 1> >
|
|
|
|
{};
|
2011-11-13 08:54:38 +00:00
|
|
|
template<typename T, std::size_t N>
|
2013-03-25 03:43:47 +00:00
|
|
|
struct c_str_as_string<T const volatile[N]>
|
|
|
|
: public sprout::identity<sprout::basic_string<T, N - 1> >
|
|
|
|
{};
|
2011-11-13 08:54:38 +00:00
|
|
|
} // namespace detail
|
|
|
|
} // namespace weed
|
|
|
|
} // namespace sprout
|
|
|
|
|
|
|
|
#endif // #ifndef SPROUT_WEED_DETAIL_C_STR_AS_STRING_HPP
|