62

I opened the draft, moved to its index, searched for the word lambda at that page, and proceeded to successive matches until, at the 5th match, I found

Bond

James Bond, [expr.prim.lambda.capture]

What's that?

I know this is stricly not a question about code, but that stuff is the draft of the standard draft! Furthermore, James Bond appears in the index beside the totally-about-the-language [expr.prim.lambda.capture]. Not sure whether I should add the tag.

I know the note at the beginning of the draft that reads

Note: this is an early draft. It's known to be incomplet and incorrekt, and it has lots of bad formatting.

but that's exactly the point: is James Bond in the index a "typo" (well, a prank), or maybe I just don't know something quite crucial?


Based on the comments, it seems this is a not-so-infrequent case of jokes in the standard.

A follow-up question (that I don't dare asking separately) would be: "Are these jokes retained in the actual standard?"

14
  • 19
    So, you haven't found the My Little Pony stuff yet?
    – sweenish
    Commented Aug 31, 2022 at 15:34
  • 8
    No, @sweenish is being serious: atomic<pony> princesses = {};
    – wkl
    Commented Aug 31, 2022 at 15:35
  • 17
    apparently because double ohseven = .007; (not kidding) Commented Aug 31, 2022 at 15:37
  • 74
    Because C++ is a serious language with a Standard written by people who like jokes. As opposed to (say) Java, which is just one big joke. Commented Aug 31, 2022 at 15:39
  • 4
    One more for you: zombie brains! But anyway, the drafts contain a number of easter eggs to, I imagine, break up the monotony for those who have to review the standard multiple times before final ratification/further discussion.
    – wkl
    Commented Aug 31, 2022 at 15:40

1 Answer 1

35

It's a joke.

Timur Doumler did a lightning talk "ISO/IEC 14882" at CppCon 2019 where he listed this and similar jokes and easter eggs from the standard.

And yes, these are part of the official standard document, not just the draft.

1
  • 2
    Much like the status 418 I'm a teapot in the HTML standard. Commented Sep 7, 2022 at 2:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.