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

modify namespace result_of -> results

support C++14 type_traits
This commit is contained in:
bolero-MURAKAMI 2013-11-20 22:04:11 +09:00
parent d386893a74
commit bf0c7021cf
350 changed files with 2628 additions and 1912 deletions

View file

@ -18,7 +18,7 @@
#include <sprout/iterator/value_iterator.hpp>
#include <sprout/container/traits.hpp>
#include <sprout/container/functions.hpp>
#include <sprout/algorithm/fixed/result_of.hpp>
#include <sprout/algorithm/fixed/results.hpp>
#include <sprout/algorithm/fixed/copy.hpp>
#include <sprout/operation/fixed/set.hpp>
#include HDR_ALGORITHM_MIN_MAX_SSCRISK_CEL_OR_SPROUT
@ -67,7 +67,7 @@ namespace sprout {
typename BidirectionalIteratorSource, typename Output, typename InputIteratorInput,
typename Buffer, typename OutputBuffer
>
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Output>::type
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Output>::type
exec_impl(
BidirectionalIteratorSource first, BidirectionalIteratorSource last,
Output const& output, InputIteratorInput in_first, InputIteratorInput in_last,
@ -144,7 +144,7 @@ namespace sprout {
// exec
//
template<std::size_t BufferSize = 32, typename BidirectionalIteratorSource, typename Output, typename InputIteratorInput>
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Output>::type
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Output>::type
exec(
BidirectionalIteratorSource first, BidirectionalIteratorSource last,
Output const& output, InputIteratorInput in_first, InputIteratorInput in_last
@ -158,7 +158,7 @@ namespace sprout {
);
}
template<std::size_t BufferSize = 32, typename BidirectionalIteratorSource, typename Output>
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Output>::type
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Output>::type
exec(
BidirectionalIteratorSource first, BidirectionalIteratorSource last,
Output const& output
@ -170,7 +170,7 @@ namespace sprout {
);
}
template<std::size_t BufferSize = 32, typename BidirectionalIteratorSource>
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<
sprout::array<typename std::iterator_traits<BidirectionalIteratorSource>::value_type, BufferSize>
>::type
exec(
@ -187,21 +187,21 @@ namespace sprout {
// exec_range
//
template<std::size_t BufferSize = 32, typename BidirectionalRangeSource, typename Output, typename InputRangeInput>
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Output>::type
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Output>::type
exec_range(BidirectionalRangeSource const& source, Output const& output, InputRangeInput const& input) {
return sprout::brainfuck::exec<BufferSize>(
sprout::begin(source), sprout::end(source), output, sprout::begin(input), sprout::end(input)
);
}
template<std::size_t BufferSize = 32, typename BidirectionalRangeSource, typename Output>
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Output>::type
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Output>::type
exec_range(BidirectionalRangeSource const& source, Output const& output) {
return sprout::brainfuck::exec<BufferSize>(
sprout::begin(source), sprout::end(source), output
);
}
template<std::size_t BufferSize = 32, typename BidirectionalRangeSource>
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<
sprout::array<typename sprout::container_traits<BidirectionalRangeSource>::value_type, BufferSize>
>::type
exec_range(BidirectionalRangeSource const& source) {

View file

@ -10,21 +10,21 @@
#include <sprout/config.hpp>
#include <sprout/container/functions.hpp>
#include <sprout/algorithm/fixed/result_of.hpp>
#include <sprout/algorithm/fixed/results.hpp>
#include <sprout/algorithm/fixed/copy.hpp>
namespace sprout {
namespace brainfuck {
namespace detail {
template<typename Result, typename Parsed>
inline SPROUT_CONSTEXPR sprout::pair<typename sprout::fixed::result_of::algorithm<Result>::type, bool>
inline SPROUT_CONSTEXPR sprout::pair<typename sprout::fixed::results::algorithm<Result>::type, bool>
parsed_to_brainfuck(Parsed const& parsed, Result const& result) {
return parsed.success()
? sprout::pair<typename sprout::fixed::result_of::algorithm<Result>::type, bool>(
? sprout::pair<typename sprout::fixed::results::algorithm<Result>::type, bool>(
sprout::fixed::copy(sprout::begin(parsed.attr()), sprout::end(parsed.attr()), result),
true
)
: sprout::pair<typename sprout::fixed::result_of::algorithm<Result>::type, bool>(
: sprout::pair<typename sprout::fixed::results::algorithm<Result>::type, bool>(
sprout::deep_copy(result),
false
)

View file

@ -13,7 +13,7 @@
#include <sprout/utility/pair/pair.hpp>
#include <sprout/container/traits.hpp>
#include <sprout/container/functions.hpp>
#include <sprout/algorithm/fixed/result_of.hpp>
#include <sprout/algorithm/fixed/results.hpp>
#include <sprout/weed/parse.hpp>
#include <sprout/weed/parser/lim.hpp>
#include <sprout/weed/parser/lit.hpp>
@ -31,7 +31,7 @@ namespace sprout {
// to_brainfuck
//
template<typename InputIterator, typename Result>
inline SPROUT_CONSTEXPR sprout::pair<typename sprout::fixed::result_of::algorithm<Result>::type, bool>
inline SPROUT_CONSTEXPR sprout::pair<typename sprout::fixed::results::algorithm<Result>::type, bool>
to_brainfuck(InputIterator first, InputIterator last, Result const& result) {
return sprout::brainfuck::detail::parsed_to_brainfuck(
sprout::weed::parse(
@ -65,7 +65,7 @@ namespace sprout {
// exec_range
//
template<std::size_t BufferSize = 32, typename BidirectionalRangeSource, typename Output, typename InputRangeInput>
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Output>::type
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Output>::type
exec_range(BidirectionalRangeSource const& source, Output const& output, InputRangeInput const& input) {
typedef typename sprout::container_construct_traits<BidirectionalRangeSource>::copied_type copied_type;
return sprout::brainfuck::exec_range<BufferSize>(
@ -74,7 +74,7 @@ namespace sprout {
);
}
template<std::size_t BufferSize = 32, typename BidirectionalRangeSource, typename Output>
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Output>::type
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Output>::type
exec_range(BidirectionalRangeSource const& source, Output const& output) {
typedef typename sprout::container_construct_traits<BidirectionalRangeSource>::copied_type copied_type;
return sprout::brainfuck::exec_range<BufferSize>(
@ -83,7 +83,7 @@ namespace sprout {
);
}
template<std::size_t BufferSize = 32, typename BidirectionalRangeSource>
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<
sprout::array<typename sprout::container_traits<BidirectionalRangeSource>::value_type, BufferSize>
>::type
exec_range(BidirectionalRangeSource const& source) {

View file

@ -13,7 +13,7 @@
#include <sprout/utility/pair/pair.hpp>
#include <sprout/container/traits.hpp>
#include <sprout/container/functions.hpp>
#include <sprout/algorithm/fixed/result_of.hpp>
#include <sprout/algorithm/fixed/results.hpp>
#include <sprout/weed/parse.hpp>
#include <sprout/weed/parser/lim.hpp>
#include <sprout/weed/parser/lit.hpp>
@ -31,7 +31,7 @@ namespace sprout {
// to_brainfuck
//
template<typename InputIterator, typename Result>
inline SPROUT_CONSTEXPR sprout::pair<typename sprout::fixed::result_of::algorithm<Result>::type, bool>
inline SPROUT_CONSTEXPR sprout::pair<typename sprout::fixed::results::algorithm<Result>::type, bool>
to_brainfuck(InputIterator first, InputIterator last, Result const& result) {
return sprout::brainfuck::detail::parsed_to_brainfuck(
sprout::weed::parse(
@ -65,7 +65,7 @@ namespace sprout {
// exec_range
//
template<std::size_t BufferSize = 32, typename BidirectionalRangeSource, typename Output, typename InputRangeInput>
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Output>::type
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Output>::type
exec_range(BidirectionalRangeSource const& source, Output const& output, InputRangeInput const& input) {
typedef typename sprout::container_construct_traits<BidirectionalRangeSource>::copied_type copied_type;
return sprout::brainfuck::exec_range<BufferSize>(
@ -74,7 +74,7 @@ namespace sprout {
);
}
template<std::size_t BufferSize = 32, typename BidirectionalRangeSource, typename Output>
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<Output>::type
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<Output>::type
exec_range(BidirectionalRangeSource const& source, Output const& output) {
typedef typename sprout::container_construct_traits<BidirectionalRangeSource>::copied_type copied_type;
return sprout::brainfuck::exec_range<BufferSize>(
@ -83,7 +83,7 @@ namespace sprout {
);
}
template<std::size_t BufferSize = 32, typename BidirectionalRangeSource>
inline SPROUT_CONSTEXPR typename sprout::fixed::result_of::algorithm<
inline SPROUT_CONSTEXPR typename sprout::fixed::results::algorithm<
sprout::array<typename sprout::container_traits<BidirectionalRangeSource>::value_type, BufferSize>
>::type
exec_range(BidirectionalRangeSource const& source) {