• 1 Post
  • 13 Comments
Joined 2 years ago
cake
Cake day: June 16th, 2023

help-circle





  • The first argument is more or less understandable (still wrong): you can’t just propel yourself upwards at your earliest convenience to reach the moon, you have to play around with orbital mechanics.
    If your friend’s idea of a moon-worthy vessel is an unsteerable rocket with infinite fuel and a chair strapped to it… well the odds are effectively zero.

    The second argument? bro, last time I checked the moon was still orbiting Earth





  • // C++20
    
    #include <concepts>
    #include <cstdint>
    
    template <typename T>
    concept C = requires (T t) { { b(t) } -> std::same_as<int>; };
    
    char b(bool v) { return char(uintmax_t(v) % 5); }
    #define Int jnt=i
    auto b(char v) { return 'int'; }
    
    // this increments i:
    void inc(int& i) {
      auto Int == 1;
      using c = decltype(b(jnt));
      // edited mistake here: c is a type, not a value
      // i += decltype(jnt)(C<decltype(b(c))>);
      i += decltype(jnt)(C<decltype(b(c(1)))>);
    }
    

    I’m not quite sure it compiles, I wrote this on my phone and with the sheer amount of landmines here making a mistake is almost inevitable.