2013-08-08 09:54:33 +00:00
|
|
|
/*=============================================================================
|
2017-07-29 05:20:01 +00:00
|
|
|
Copyright (c) 2011-2017 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)
|
|
|
|
=============================================================================*/
|
2012-12-19 14:06:08 +00:00
|
|
|
#ifndef SPROUT_STRING_STRETCH_HPP
|
|
|
|
#define SPROUT_STRING_STRETCH_HPP
|
|
|
|
|
|
|
|
#include <sprout/config.hpp>
|
2014-04-30 07:30:26 +00:00
|
|
|
#include <sprout/workaround/std/cstddef.hpp>
|
2012-12-19 14:06:08 +00:00
|
|
|
#include <sprout/string/string.hpp>
|
|
|
|
|
|
|
|
namespace sprout {
|
|
|
|
//
|
|
|
|
// stretch
|
|
|
|
//
|
|
|
|
template<std::size_t To, typename T, std::size_t N, typename Traits>
|
|
|
|
inline SPROUT_CONSTEXPR sprout::basic_string<T, To, Traits>
|
|
|
|
stretch(sprout::basic_string<T, N, Traits> const& s) {
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
|
|
|
|
template<std::size_t To, typename T, std::size_t N>
|
|
|
|
inline SPROUT_CONSTEXPR sprout::basic_string<T, To>
|
|
|
|
stretch(T const(& arr)[N]) {
|
|
|
|
return sprout::stretch<To>(sprout::to_string(arr));
|
|
|
|
}
|
|
|
|
} // namespace sprout
|
|
|
|
|
|
|
|
#endif // #ifndef SPROUT_STRING_STRETCH_HPP
|