#include <iostream>
int add(int a, int b) { return a + b; }
int main() {
// create type alias "AddType" for function of two ints that returns an int
// (this is just C syntax I believe)
typedef int (AddType) (int, int);
AddType&& add_rvalue_ref = (AddType&&)add;
std::cout << add_rvalue_ref(1, 2) << "\n";
}
@vaporeon_ I've actually never done it before so this'll take me a second haha
@aescling No. You would just bind the function to a reference or use a lambda, or as a last resort use a function pointer. I cannot imagine a use case for this
@aescling yeah
@aescling lvalue
@cam it looks like bnnuy
@wallhackio @coriander Let Goblins Beam Tuesdays
@coriander i hereby permit goblins to emit beams. but only on tuesdays
@The_T "upon being reminded of having a luau at Sigourney Weaver's house, you are filled with determination"
@The_T the fuck lmao
@amy wow you've grown!! im very proud of you :)
(still short though)
@amy 🫵 smol
@amy 🫵 short
@vaporeon_ the other good Moon Cat
@cam booooooooo
@cam ........do people not do this
i go by Clodsire, Clodboy and Catwin.
videogame enjoyer. mathematics hobbyist and recovering physicist. software engineer. professional wonk. prophet of The Truth. the walking embodiment of "not diagnosed, but somethings wrong". i like animals that wear cowboy hats.
number of fat cock awards received: 56
header is by @vaporeon_
"i regret ever allowing him here" ~aescling
"oh you're one of those weird movie likers" ~Ti
28+
he/him