The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
Namespaces | Functions
wfl::implementation Namespace Reference

Namespaces

namespace  detail
 

Functions

template<typename Func >
variant zip_transform (const variant &v1, const variant &v2, const Func &op_func)
 Applies the provided function to the corresponding variants in both lists.
 
variant concat_lists (const variant &v1, const variant &v2)
 
template<typename Range >
auto make_iterator_range (const variant_value_base *val, const Range &range) -> boost::iterator_range< variant_iterator >
 
template<typename Range , typename Func >
std::string to_string (const Range &range, const Func &op)
 
template<typename Range , typename Func >
std::string as_literal (const Range &range, const Func &op)
 

Function Documentation

◆ as_literal()

template<typename Range , typename Func >
std::string wfl::implementation::as_literal ( const Range &  range,
const Func &  op 
)

◆ concat_lists()

variant wfl::implementation::concat_lists ( const variant &  v1,
const variant &  v2 
)

Definition at line 597 of file variant.cpp.

References wfl::variant::as_list().

Referenced by wfl::variant::concatenate().

◆ make_iterator_range()

template<typename Range >
auto wfl::implementation::make_iterator_range ( const variant_value_base *  val,
const Range &  range 
) -> boost::iterator_range<variant_iterator>

◆ to_string()

template<typename Range , typename Func >
std::string wfl::implementation::to_string ( const Range &  range,
const Func &  op 
)

◆ zip_transform()

template<typename Func >
variant wfl::implementation::zip_transform ( const variant &  v1,
const variant &  v2,
const Func &  op_func 
)

Applies the provided function to the corresponding variants in both lists.

Todo:
Expose this to the public API.

Definition at line 576 of file variant.cpp.

References wfl::variant::as_list(), and i.

Referenced by wfl::variant::list_elements_add(), wfl::variant::list_elements_div(), wfl::variant::list_elements_mul(), and wfl::variant::list_elements_sub().