C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Improved Member Operator Syntax
From: Matthew Woehlke (mwoehlke.floss_at_[hidden])
Date: 2019-10-17 14:32:38


On 17/10/2019 04.57, Jake Arkinstall via Std-Proposals wrote:
> the whole fake int parameter bodge is certainly a slight annoyance.

...but there is a trivial, library-only fix for that:

  namespace std
  {
    using prefix = void;
    using postfix = int;
  }

  struct foo
  {
    int operator++(std::prefix);
    int operator++(std::postfix);
  };

-- 
Matthew

STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups