C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] deleting qualified named functions
From: Dejan Milosavljevic (dmilos_at_[hidden])
Date: 2020-02-05 01:46:24


This syntax is confusing ( for me ):
struct S
{
    std::swap(S&, S&) = delete;
};

(I) Prefer more code:
struct S
{
};

std::swap(S&, S&) = delete;

On Tue, Feb 4, 2020 at 9:50 PM Daniel Gutson via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> What people think about this?
>
> struct S
> {
> *std::*swap(S&, S&) = delete;
> };
>
> In this example, this would be useful to prevent std::sort for example
> (even if we add operator< ).
>
> --
> Who’s got the sweetest disposition?
> One guess, that’s who?
> Who’d never, ever start an argument?
> Who never shows a bit of temperament?
> Who's never wrong but always right?
> Who'd never dream of starting a fight?
> Who get stuck with all the bad luck?
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>



STD-PROPOSALS list run by herb.sutter at gmail.com

Standard Proposals Archives on Google Groups