awavauatush @ninjawedding
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
ยท Web ยท 4 ยท 7

@ninjawedding yesss yesssssssssss.... ๐Ÿ‘ป๐Ÿค”

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 :)