STD::_MU(3cxx)

πŸ’– NAME πŸ’–

std::_Mu< _Arg, _IsBindExp, _IsPlaceholder > β€” bestie, this is the little secret helper class that does the behind-the-scenes mapping magic for bind(). No cap.

Oh and hii, welcome to the std::_Mu< _Arg,...IsPlaceholder >(3cxx) page πŸ’… yes the man page name is giving "template soup" but we're gonna vibe through it together.


✨ SYNOPSIS ✨

Detailed Description

Okay so first, the receipt. The actual declaration is this, and you're gonna want to copy it exactly:

template<typename _Arg, bool _IsBindExp = is_bind_expression<_Arg>::value,
    bool _IsPlaceholder = (is_placeholder<_Arg>::value > 0)>
    class std::_Mu< _Arg, _IsBindExp, _IsPlaceholder >

So what does this cutie actually do? It maps an argument to bind() into an actual argument for the bound function object β€” that's [func.bind.bind]/10 if you wanna go read the standard, iykyk πŸ“–

And here's the thing you NEED to know, no skipping: only the first parameter should be specified. Like, only _Arg. The rest of them? They're just there so the implementation can figure out which of the various implementations it's dealing with. Not your job, babe, that's the compiler's job 🫢

Now for the iconic part. Even though this class is a function object, it is not entirely normal β€” and honestly? relatable. It takes only two parameters, regardless of how many parameters got passed to the bind expression. The way that works is:

  1. The first parameter is the bound argument πŸ“Œ
  2. The second parameter is a tuple containing references to the rest of the arguments πŸŽ€

Periodt. That's the whole vibe check.


🌸 Author 🌸

This whole thing was generated automatically by Doxygen for libstdc++ from the source code. Not a human typing it out at 3am β€” the robot did it. Slay, I guess πŸ€–βœ¨


And that's the page, bestie! This one came from libstdc++, generated by Doxygen straight from the source code, and the footer it left us with literally reads libststd::_Mu< _Arg,...IsPlaceholder >(3cxx) β€” yeah the title got a lil smooshed into the page number, iconic typo energy fr fr πŸ’€πŸŒΈ Go forth and let _Mu do its mysterious little mapping thing behind the scenes, you don't gotta understand all three template params, you just gotta pass the first one πŸ‘‘πŸ’–