220 21312 <CALQmNFivTVc3=rBNWP3ByyCf1r7rnzJNR-YWbczC3TS40SPWhg@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Sean Middleditch <sean@middleditch.us>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: missing hash_code result in P0029
Date: Mon, 5 Oct 2015 13:18:17 -0700
Lines: 33
Approved: news@gmane.org
Message-ID: <CALQmNFivTVc3=rBNWP3ByyCf1r7rnzJNR-YWbczC3TS40SPWhg@mail.gmail.com>
References: <d714437b-638b-4a72-9e0a-35c4f6e9e484@isocpp.org>
	<CA+cyFgtfKizhNXy0YqYASTwg6XC-EpSMU46kPGLYSn06JE53Ww@mail.gmail.com>
	<1572715.jJmjmrJA0J@tjmaciei-mobl4>
	<CAFmGaCoRKXE9pVUpW=qD8or8Z-pXa3Ve8DMUjDJg-=+w66awsA@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1444076301 26739 80.91.229.3 (5 Oct 2015 20:18:21 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 5 Oct 2015 20:18:21 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCDODCNR2QPRBCVWZOYAKGQEFSKJKOY@isocpp.org Mon Oct 05 22:18:20 2015
Return-path: <std-proposals+bncBCDODCNR2QPRBCVWZOYAKGQEFSKJKOY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-la0-f72.google.com ([209.85.215.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCDODCNR2QPRBCVWZOYAKGQEFSKJKOY@isocpp.org>)
	id 1ZjCDD-0006E6-MY
	for gclcip-std-proposals@m.gmane.org; Mon, 05 Oct 2015 22:18:19 +0200
Original-Received: by lana8 with SMTP id a8sf42078022lan.1
        for <gclcip-std-proposals@m.gmane.org>; Mon, 05 Oct 2015 13:18:19 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:sender:in-reply-to:references:date
         :message-id:subject:from:to:content-type: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=VEAao/LSf+v+7KBMRLyJBpAEFgeipMXTQxWu7CG+j7U=;
        b=BD6ngbjocEfIFeOyb/1nFd4NstpLOd36ogm6U89m9+q7Eh/Y9budA4VgYMXMO5pPk/
         rM0VzSIa2xCrwzKSYWmF29UJA0cCl6I6XeIhGMgxy3KARCV/Pkg1LHWm36kDD4q5SP6R
         y/5/6tdqgR95kAUj/7WwXnT2P50pANhIlgW3P9q0sd4g2SDrCQckLYva+DvLd4DxS/TB
         rl0LF1JuS+CUkJS/4Z6xOyyhYAZXqLDHpMC+VOdp+qDo2pZ9bPp656uGU9cDOIPSE5rw
         nE6PIE3KgRk7vnKGhsR0akCvcHtq30i1BvHvj1EAoIlDZp4ItxWo7ztQTmHxgbxF9k8s
         x0tA==
X-Gm-Message-State: ALoCoQkB9OeGIjX1Pf5uYrsAWDIXTH5Eyq+pT5ChQCl2Seu8pLkWvrV0ybuNzBr2+chvw5h0gEKf
X-Received: by 10.180.10.202 with SMTP id k10mr2813755wib.2.1444076299379;
        Mon, 05 Oct 2015 13:18:19 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.211.50 with SMTP id mz18ls928640wic.25.canary; Mon, 05 Oct
 2015 13:18:18 -0700 (PDT)
X-Received: by 10.180.198.109 with SMTP id jb13mr13746699wic.17.1444076298430;
        Mon, 05 Oct 2015 13:18:18 -0700 (PDT)
Original-Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com. [2a00:1450:400c:c05::236])
        by mx.google.com with ESMTPS id er8si33213706wjc.65.2015.10.05.13.18.18
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 05 Oct 2015 13:18:18 -0700 (PDT)
Received-SPF: pass (google.com: domain of sean.middleditch@gmail.com designates 2a00:1450:400c:c05::236 as permitted sender) client-ip=2a00:1450:400c:c05::236;
Original-Received: by wiclk2 with SMTP id lk2so130996524wic.1
        for <std-proposals@isocpp.org>; Mon, 05 Oct 2015 13:18:18 -0700 (PDT)
X-Received: by 10.194.62.20 with SMTP id u20mr37542799wjr.2.1444076297878;
 Mon, 05 Oct 2015 13:18:17 -0700 (PDT)
Original-Sender: sean.middleditch@gmail.com
Original-Received: by 10.27.14.72 with HTTP; Mon, 5 Oct 2015 13:18:17 -0700 (PDT)
In-Reply-To: <CAFmGaCoRKXE9pVUpW=qD8or8Z-pXa3Ve8DMUjDJg-=+w66awsA@mail.gmail.com>
X-Original-Sender: sean@middleditch.us
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of sean.middleditch@gmail.com designates 2a00:1450:400c:c05::236 as
 permitted sender) smtp.mailfrom=sean.middleditch@gmail.com;       dkim=pass header.i=@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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:21312
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/21312>

On Mon, Oct 5, 2015 at 10:34 AM, Shahms King <shahms.king@gmail.com> wrote:
> You can trivially use them in your own hashing container, as you would now.
> The primary thing that is being changed is the mechanism by which
> user-defined types can supply their data to the hash function, not the
> interface for retrieving final values from that hash function.  The
> high-level API for retrieving a hash value from an object is unchanged, e.g.

Gotcha. In that case, this proposal is less complete than N3980 was.
The HashAlgorithm uhash<> interfaces were more widely usable. With
P0029, users have to write extraneous high-level wrappers around their
algorithms (a std::hash replacement), and generic code that needs to
support generic progressive hashes is left without a solution.

It seems to me a near trivial addition to require HashCode to have a
result_type and a conversion operator/method to result_type. It will
still satisfy all the goals of P0029 while also satisfy requirements
covered by N3980, no?

Is there a significant cost/risk of adding such an interface to the
HashCode concept?

-- 
Sean Middleditch
http://seanmiddleditch.com

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.
