• @[email protected]
    link
    fedilink
    11 year ago

    A construct that’s not supported by g++ is not a superior alternative to a simple macro.

    That said, once support is near-universal, it probably will be preferable.

    • @[email protected]
      link
      fedilink
      31 year ago

      Yeah, I meant to include that in my post but forgot. I actually started out thinking that it wouldn’t be too hard to implement on top of std::optional but then went down a rabbit hole to see if it already existing in the standard library.

      In any case, you could also always use abseil for features that haven’t landed in the compiler yet. At work, I’m stuck on c++14, but having a great time using plenty of features from later versions thanks to abseil.