11 if (args.size() < 2) {
12 cerr << args[0] <<
" <string>\n";
21 if (
'A' <=
Betw(c) <=
'Z') {
The main RC Library include file, which includes all other components.
#define RC_USE
Place this shorthand macro after including RC.h to use namespaces RC and std.
Definition: RC.h:50
#define RC_MAIN
This macro wraps int main so that command line arguments are placed into RC::Data1D<RC::RStr> args.
Definition: RC.h:61
A bounds-safe string class which provides an identical interface to std::string plus many convenience...
Definition: RStr.h:110
BetwCompare< T > Betw(const T &x)
Returns a comparator that can be used for range comparisons.
Definition: RCBits.h:69
10 Tuple<u16, RStr> DoStuff(Caller<void, f32> callback) {
12 f32 val = rng.Get_f32();
19 return {rng.Get_u16(),
"apples"};
27 void CallIt(Doer &d) {
29 auto tup = d.DoStuff(
MakeCaller(
this, &Waiter::CallBack));
32 auto tup2 = d.DoStuff({
this, &Waiter::CallBack});
35 cout <<
"It returned " << tup.Get<0>() <<
" " << tup.Get<1>() << endl;
39 void CallBack(
f32 x) {
40 cout <<
"I got x == " << x << endl;
float f32
32-bit float.
Definition: Types.h:33
Caller< Ret, Params... > MakeCaller(C *obj, Ret(C::*func)(Params...))
Generates a Caller for the member function of the given object, with type inference.
Definition: Caller.h:241