Follow
So I spent most of my evening trying to find a way to deduce a C++ function's first argument type

I might have unleashed some ancient horrors on the world. We'll find out next Halloween or something I guess
Andrei Alexandrescu is known for creating the STL, but did you know that his day job is as a necromancer
I have been corrected that Alexander Stepanov is the creator of the STL. See, I was subject to some mind-control magic by Alexandrescu
@LottieVixen i am probably not going to understand this within 48 hours so don't feel bad about it

although if you have specific questions I can try to answer them :P

@ninjawedding nothing specific...I like C++ though (I'm just not good at it)

@LottieVixen I think it's helpful to think of the specializations as pattern-matching, like

struct function_traits<Result(Class::*)(Args...) const>

is going to match on a type that looks like Result(Class::*)(Args...). I figured that out by reading clang compiler errors and going "oh, it's trying to match this". a similar "oh, thanks compiler" process went into the function specialization

really if your language has decent pattern matching you probably don't need any of this shit
@LottieVixen I expanded some of the comments in that code snippet; lmk if it helps :)
Sign in to participate in the conversation
sdfn-01.ninjawedding.org

This is a small ship in the fediverse.

The name is borrowed from the mass-produced Macross-class ships in the Macross universe; SDFN-01 Hayase was the first of the line. The ships were designed to scout emigration routes ahead of the Megaroad colonization ship.

More information can be found at the Macross Compendium.

Federation transparency report (2018-11-03)

  • Suspended instances: newjack.city
  • Silenced instances: none
  • Reject media: preteengirls.biz