220 37074 <CAFk2RUYOMtQSR17Lr8C35sgjrSuK3yVYxx7iveYbv_tw4_YUNg@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Ville Voutilainen <ville.voutilainen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: specify concept implementation
Date: Mon, 26 Feb 2018 18:12:55 +0200
Lines: 35
Approved: news@gmane.org
Message-ID: <CAFk2RUYOMtQSR17Lr8C35sgjrSuK3yVYxx7iveYbv_tw4_YUNg@mail.gmail.com>
References: <93e7e509-edf0-4df6-9b2f-555bba92a04a@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1519661457 24568 195.159.176.226 (26 Feb 2018 16:10:57 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 26 Feb 2018 16:10:57 +0000 (UTC)
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC5JHI7A7ALRBCPE2DKAKGQE62CUTEA@isocpp.org Mon Feb 26 17:10:53 2018
Return-path: <std-proposals+bncBC5JHI7A7ALRBCPE2DKAKGQE62CUTEA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f70.google.com ([209.85.218.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBCPE2DKAKGQE62CUTEA@isocpp.org>)
	id 1eqLMZ-0005pg-S0
	for gclcip-std-proposals@m.gmane.org; Mon, 26 Feb 2018 17:10:52 +0100
Original-Received: by mail-oi0-f70.google.com with SMTP id p6sf2452187oic.9
        for <gclcip-std-proposals@m.gmane.org>; Mon, 26 Feb 2018 08:12:58 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1519661578; cv=pass;
        d=google.com; s=arc-20160816;
        b=EZo9NWVKCks1UZHWKKVWp737XH1qTZSIyFtSoHag3ZnjuQ9lm5EcStECSToUd4wqsv
         eUzRpgYtRQP7YsSf4FlTbv1pWuOwC/c8UgeqrC2bvtuEnUcUrxF5ZTl+y2JvY31cwPIl
         N6QkqBe++848EqKUVMVKvKf4awGivcqaHny6r9p7HUhw3ueO7WztcS0ereZRSwLfpLWG
         HVY2LG1EmhfyRWqgxUY2MKJjmkxOHRRjYgjr/r3wWER/zi7nvhY8HPoPu9PP2Sd8e0Zq
         0rCYvORMEL0dQ0/fVSeasrT6QqJN2HYd4MReO5Whcu5bmb54OeSoHHoHS8We3esXJpmU
         ERXQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=wdqdshPXIHTzB2wpBxiU3XQF2EffvZ7JzHdPmzp8Deg=;
        b=rkIbz2yXTIFmxhd6o1ldMA8PfPP3awgjmLaRhAoeAK1b43zlLrDWZ02B/FUVgShIzt
         gH/k3UFigduOE3mwATMnjhMEd/IW7sCzfGIkaRbx7X3y0Szquj/XE7uRqjJx1iSmdn/g
         PZybos60J9SvM7ilWufbkg+TZunm9ArxCmj+/LGs6hC35YKcCBEmQ+Vl1wQk7kNYS9SK
         Djb2fvFacywfGYvLS1DOF5TYMiz3qwKVtOD8AvhksC8hs4W5YiEjBZ8J2d/o/cDjLe4w
         THd0pf1YWKOXYHPzksP+PvxG4pvntQh8sGQAeMop05Iw+nCaNF79NgTitAV6fZKZnVC9
         U2wQ==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=dKYZfm2l;
       spf=pass (google.com: domain of ville.voutilainen@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=ville.voutilainen@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=wdqdshPXIHTzB2wpBxiU3XQF2EffvZ7JzHdPmzp8Deg=;
        b=gl74qose85aIDidoIHjr8UMu7axDzdoIVkYuzOoFjVzfnIv3SpnK+hcN2FsN2lRFd1
         tbrTx2tULJ9FEFIrDLlLQAyFOSyil08zqZLO9JC7uDFQNlw7qsw3ifOSTrenSpMNlona
         3zPu8jBk8yMzI2tJE9ea20I+rs0R15gmglVwB1JU12RoCELhjZKlTj/x5WIbk6e5d9fD
         dtFrYnd/hWJnA+HJ5K2cyU4k+h52UV2B8EYTNosPbamFYYrmrNsCdxJ11pOUEYjLbehM
         /CF825mUwsnUqcqPdVb/HDBuG+hGhLZRE8snaAGWzMj5/RYqIiGaL/mOa654YB2AmUBe
         O0dg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=wdqdshPXIHTzB2wpBxiU3XQF2EffvZ7JzHdPmzp8Deg=;
        b=napm5Y/a8/tWWauvfOw5nqzxFBN8J4QY44Xn55hEUSFs/WpoKLytajYoCUqBIkksez
         DSTGmB6TBLD9YQqsy/50iMFoRYvqKgY1XQpgvtJisInNHH3h+Xsm0oFAb7BysDy3K1c/
         CTFi8xeb3USPu4XpPgF365N3OmPSB5Zlau3z0CQWuilNkkSxYg8TlEcRhUd4tfArSPcp
         jK872lv9CPdBj0pVl/I+0mjB2tBURa7X8ucNqbgXIZVKXUnwiKAZWu9+d8tvDRZJ5KAj
         7sfO+LT1JEJ5zcxRTHpBZcnbvOWwEMkyQ/Q3uPTiwjHnRzcU4l5CfY8EoexNjlsnIp3V
         W1uQ==
X-Gm-Message-State: APf1xPCVNQ0zjsoza0XEVgi1XjrX1/L4rNlnfHZQ/q7j1v5kNdaPhsUo
	B7/+eSV9OWMfAs4mijPZyVF9Qg==
X-Google-Smtp-Source: AG47ELtXermXPtYvJd6bTVP9n+y70j0cHx58wMGl2GbD0baKGhN1hQmtWkMFi6M5OIfkWv87KlfpqQ==
X-Received: by 10.157.54.249 with SMTP id s54mr1472880otd.73.1519661577923;
        Mon, 26 Feb 2018 08:12:57 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.202.84.133 with SMTP id i127ls720956oib.8.gmail; Mon, 26 Feb
 2018 08:12:56 -0800 (PST)
X-Received: by 10.202.212.147 with SMTP id l141mr7404652oig.32.1519661576747;
        Mon, 26 Feb 2018 08:12:56 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1519661576; cv=none;
        d=google.com; s=arc-20160816;
        b=eSSIJ4fPGqqXsY8OtjMzogRywTC33wCtg85FD1wiFkRVGOLnH8qoTICXQQ4QgDbpil
         FS2Xg0IdzvSyCHcETJ3ggeOUrUVgktyxPCubBnZtgOTklI6fdymXw+aHxt/5NjXjvMGK
         3ZZ1Z8sJoGXHZU/iu7FOHyHyq+PF81PFX37tpwz0ntqQx9GPYT0mvIu+08Hip7UVj0Ru
         vx8vXubVdQJ5EmYayVTDX6nWzGdbs63F4GqcJ5RfoGI+ZBYkqfY8MgQr7wFNclcrM5XO
         UVwqH1ebpDCaTSeN1A6IhaPOqKFdzttbmuvMOdU9nPmB1xL3rVUMkUs6pst4+P/KWy0T
         XALg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :dkim-signature:arc-authentication-results;
        bh=ACRrH4BmREtoGoBjeAb8gyoJnKrkImP8u7E6oNu4+jM=;
        b=j2tSJ+15o/u6XINNfzpXFYlkEad0UEVhKVYagOJ2eyLbjh97ZDQGyjuxmKzllPFai9
         nRTOYtZEzd3ek0GuV6WhcqM291IuAenaJjH15zetn3XGmHupwBn+wvqI6dG0iWgWPFv9
         ZOV2wM1Bon8rzGX6kjdev10HVm45nR4Gq0qw8bJ6ckMSN8FZLw1rmTUc6MDKYkfORoZ7
         d6jpd0sntKh+Xtjm5XnLBnf1dgTEtwp9EM2NBcFlETQ5gcnZq6DByBH8RmCOaTFoqNC8
         yOVdKs/OK9IWtNFrATXlU4POBTa73S9LGCi4OINTvzsc9HeLYIa0DSmZrtW/zEK3oEdV
         ik8A==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=dKYZfm2l;
       spf=pass (google.com: domain of ville.voutilainen@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=ville.voutilainen@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65])
        by mx.google.com with SMTPS id g189sor3100289oif.264.2018.02.26.08.12.56
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Mon, 26 Feb 2018 08:12:56 -0800 (PST)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65;
X-Received: by 10.202.28.15 with SMTP id c15mr6534508oic.243.1519661576255;
 Mon, 26 Feb 2018 08:12:56 -0800 (PST)
Original-Received: by 10.157.33.194 with HTTP; Mon, 26 Feb 2018 08:12:55 -0800 (PST)
In-Reply-To: <93e7e509-edf0-4df6-9b2f-555bba92a04a@isocpp.org>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=dKYZfm2l;       spf=pass
 (google.com: domain of ville.voutilainen@gmail.com designates 209.85.220.65
 as permitted sender) smtp.mailfrom=ville.voutilainen@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:37074
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/37074>

On 26 February 2018 at 18:11,  <bastienpenava@gmail.com> wrote:
> Hi,
>
> I believe it would be interesting to allow the users to state, when
> declaring a type, that he aims at implementing a specific concept.
>
> template<class T>
> concept ValueType = requires() { T::value; }
>
> struct A : concept C
> {
> };
>
> //once the type has been instantiated check that the concepts are valid with
> the new type.
> //error: A doesn't satisfy the C concept. No A::value
>
> I believe it would render the code easier to read by making explicit the
> intent of the writer.
> It would also make debugging easier in case of an error when writing an
> implementation of a concept and
> could be useful if/when the definition of a concept changed.


struct A
{
};
static_assert(C<A>);

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFk2RUYOMtQSR17Lr8C35sgjrSuK3yVYxx7iveYbv_tw4_YUNg%40mail.gmail.com.

.
