News for hackers. Stuff that matters.
Re:C++ 17 is Done by steveklabnik on Saturday March 25, 2017 @01:50PM (#13956728)

  void f(std::variant<int, char>)
would be

  f(x: IntOrChar)
roughly in Rust, I'm too lazy to make the types _exactly_ the same, but https://godbolt.org/g/pZde2A is roughly it.

Actually, https://godbolt.org/g/1vcMeG might be even better to compare; I'm not an expert, but looks like the only difference is in the size.

last one, adding inline(never) so you can see the calls in main: https://godbolt.org/g/cVDjQH

  movabs  rdi, 21474836480
  call    example::f1@PLT
vs

  mov     edi, 5
  pop     rbp
  jmp     example::f2@PLT
so, yup.
Re:C++ 17 is Done by typon on Saturday March 25, 2017 @11:23PM (#13958933)
Thank you! This is really cool.