C++ Logo

std-proposals

Advanced search

Re: Improved Member Operator Syntax

From: Matthew Woehlke <mwoehlke.floss_at_[hidden]>
Date: Thu, 17 Oct 2019 15:32:38 -0400
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

Received on 2019-10-17 14:34:54