Methods that extend the functionality of the standard library.
More...
|
template<class StdContainer > |
int | honey::size (const StdContainer &cont) |
| Safely get the size of a std container as a signed integer. More...
|
|
template<class Range > |
auto | honey::keys (Range &&range) -> Range_< TupleIter< mt_iterOf(range), 0 >, TupleIter< mt_iterOf(range), 0 >> |
| Create a range over the keys of a map or map iterator range. More...
|
|
template<class Range > |
auto | honey::values (Range &&range) -> Range_< TupleIter< mt_iterOf(range), 1 >, TupleIter< mt_iterOf(range), 1 >> |
| Create a range over the values of a map or map iterator range. More...
|
|
template<class Func , class... Args> |
auto | honey::bind_fill (Func &&f, Args &&...args) -> decltype( priv::bind_fill< mt::funcTraits< typename mt::removeRef< Func >::type >::arity >()(forward< Func >(f), forward< Args >(args)...)) |
| Version of bind that automatically fills in placeholders for unspecified arguments. More...
|
|
template<class Func , class... Args> |
auto | honey::manipFunc (Func &&f, Args &&...args) |
| Helper to create a manipulator that takes arguments. eg. A manip named 'foo': auto foo(int val) { return manipFunc([=](ios_base& ios) { FooManip::inst(ios).val = val; }); } More...
|
|
Methods that extend the functionality of the standard library.
template<class Func , class... Args>
auto honey::bind_fill |
( |
Func && |
f, |
|
|
Args &&... |
args |
|
) |
| -> decltype( priv::bind_fill<mt::funcTraits<typename mt::removeRef<Func>::type>::arity>()(forward<Func>(f), forward<Args>(args)...))
|
Version of bind that automatically fills in placeholders for unspecified arguments.
Example
To bind the this
pointer for a member function: void Class::func(int, int)
The standard bind method is: | bind(&Class::func, this, _1, _2); |
bind_fill has a more convenient syntax: | bind_fill(&Class::func, this); |
Create a range over the keys of a map or map iterator range.
- See also
- values()
template<class Func , class... Args>
auto honey::manipFunc |
( |
Func && |
f, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
Helper to create a manipulator that takes arguments. eg. A manip named 'foo': auto foo(int val) { return manipFunc([=](ios_base& ios) { FooManip::inst(ios).val = val; }); }
template<class StdContainer >
int honey::size |
( |
const StdContainer & |
cont | ) |
|
Safely get the size of a std container as a signed integer.
Create a range over the values of a map or map iterator range.
- See also
- keys()