xformed.hpp
Go to the documentation of this file.
#define ABL_DECLTYPE_RETURN(body_expr)
Utility for defining generic functions with a deduced return type, that are composed of a single expr...
Definition: utils.hpp:109
typename std::enable_if< X, T >::type enable_if_t
Similar to C++14 std::enable_if_t.
Definition: type_traits.hpp:84
auto set_attr(AttrPtrT p) -> detail::set_attr_fn< AttrPtrT >
Returns a update function that uses the given pointer to member.
Definition: xformed.hpp:252
auto attred(AttrPtrT attr, Ins &&...ins) -> estd::enable_if_t< meta::all(In_value< Ins >()&&!Out_value< Ins >()...), decltype(xformed(xform::map(get_attr(attr)), ins...)) >
Given a pointer to member, returns a xformed version of the ins accessed through the member...
Definition: xformed.hpp:260
Utility to write simple transducers easily.
Definition: transducer_impl.hpp:60
auto modified(T &) -> estd::enable_if_t<!std::is_convertible< T &, structure< T > & >::value >
Call this on an structure value to indicate that is has indeed changed, invalidating its cached value...
Definition: structure.hpp:160
auto get_attr(AttrPtrT p) -> detail::get_attr_fn< AttrPtrT >
Returns a unary function that dereferences the given pointer to member to the applied objects...
Definition: xformed.hpp:245
auto atted(KeyT &&k, Ins &&...ins) -> estd::enable_if_t< meta::all(In_value< Ins >()&&!Out_value< Ins >()...), decltype(xformed(xat(k), ins...)) >
Returns xformed version of the ins using xat.
Definition: xformed.hpp:190
auto xformed(Xform &&xform, InTs &&...ins) -> estd::enable_if_t< meta::all(In_value< InTs >()...), detail::xformed_input< typename decltype( detail::make_xform_down_signal( xform, detail::access::signal(ins)...) )::element_type > >
Returns a new in formed by applying a transducer xform on the successive values of the in...
Definition: xformed.hpp:70
auto map(MappingT &&mapping) -> map_t< estd::decay_t< MappingT > >
Similar to clojure.core/map$1.
Definition: map.hpp:79
auto xat(KeyT &&key) -> xform::transducer_impl< detail::at_rf_gen, estd::decay_t< KeyT > >
Transducer that projects the key key from containers with a standard-style at() method.
Definition: xformed.hpp:164
auto uat(KeyT &&key) -> detail::at_updater< estd::decay_t< KeyT > >
Update function that updates the key in a container with a standard-style at() method.
Definition: xformed.hpp:177