Looks like it creates a few emoji printers in a vector, then prints them all. The output is all emoji, of course. The main function exits with a random return value just to be more quirky.
I'm not sure what the purpose of the 😎 function is. In main that first predicate is always true, so it prints the poop emoji. I don't know why it's behind an if.
Also, there's a copy-paste error on line 31. Wrong emoji is used.
Imagine how much more readable it would be if you could break a loop with 💀 or return true with 👍. Or use ❓for ifs, or ↔️ for switch (the emoji didn't work for that one). Or use an emoji to represent a custom object?
Maybe the ECMA should get on that!
Edit: I guess you can use emojis for custom objects in js.
Line 38 and 39 just check if a function that always returns false is false and if so, prints "💩\n". (C++ uses the bit shift operator for file IO for some reason)
Line 41 creates a vector of shared pointers to an abstract class, or in other words, an array of functions. Each function prints the emoji, mostly the same as the name, but not always. ( 🍒 is the exception, it prints "🍉\n")
43 and 44 just loop over the array and call every function inside, printing a bunch of emoji.
Line 46 returns the result of std::rand(), but because the programer forgot to call srand, the result is always the same (1804289383 for me).
(There are also a few missing includes, but I doubt this is intentional)
Yep, main returns an int in C++. It’s for the return code - if it returns 0, that indicates the program ran ok, if it returns anything else some sort of error occurred.