220 30101 <CAFk2RUbmHo7zVd1AgpNHMgncJkfFq4EB_JVX10LOK3E1BTSP8A@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: Re: decltype(return)
Date: Thu, 29 Dec 2016 20:32:20 +0200
Lines: 30
Approved: news@gmane.org
Message-ID: <CAFk2RUbmHo7zVd1AgpNHMgncJkfFq4EB_JVX10LOK3E1BTSP8A@mail.gmail.com>
References: <658f00ff-7a02-7c04-3fcb-6ac7f45b777b@scylladb.com>
 <CAKqmYPbB4Drfrz2ZUbFnJP+aSwdW2AGfj+WVvPaP7Ge1PiyyeA@mail.gmail.com>
 <425f6577-b92d-40f3-8d0d-64668351edf5@isocpp.org> <CAKqmYPag-x0esrhJg7vjerjtQA7GJyN4KycqtOh9+202P4YGRg@mail.gmail.com>
 <5863DB05.3030805@gmail.com> <CAFk2RUYEC4z8iMvmFSS_ksqvd8-XBhNemcqW_oaoU2AMjp_0bg@mail.gmail.com>
 <f37c320c-b41b-4f03-b371-acdb496c05ee@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 1483036345 2407 195.159.176.226 (29 Dec 2016 18:32:25 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 29 Dec 2016 18:32:25 +0000 (UTC)
To: "ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC5JHI7A7ALRBNNNSXBQKGQE7YEHG5Y@isocpp.org Thu Dec 29 19:32:21 2016
Return-path: <std-proposals+bncBC5JHI7A7ALRBNNNSXBQKGQE7YEHG5Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f198.google.com ([209.85.161.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBNNNSXBQKGQE7YEHG5Y@isocpp.org>)
	id 1cMfUv-0007te-Ij
	for gclcip-std-proposals@m.gmane.org; Thu, 29 Dec 2016 19:32:17 +0100
Original-Received: by mail-yw0-f198.google.com with SMTP id s68sf422790569ywg.7
        for <gclcip-std-proposals@m.gmane.org>; Thu, 29 Dec 2016 10:32:22 -0800 (PST)
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:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=+mVhcAiKhhMDCYcweAIPYvVHoS3OGDlKw7rdOvOKGWg=;
        b=j8vFQXmcylKuGIUcq9vQG6kyXEYQk6P5nF7tWnDZO0paFQyzWAqZSFDNgZnOb8OcjA
         WG/POc6RcqW+WKvUkxoC5DQsdW0Qz+5NxgyeZ7f3LJ9JVT2/KR65Con/4FGN98M01HrC
         n3eqEy4CnvI7VwW11Ftg7Qp4BjMZz/EWmPH/7r9Y4Q5D7Hmbt9RjTH7FfZqnQyyE08JT
         I7/ey6r43HGIi1Tcdq2yksdUVB+Rp7c/tjvUaFtEZvAGX+DD6d2wy9eA8Z8OmnViVnN2
         MasNVd7wy40yA/1yvqKKpzdsmH66i0o98djmuMJYNzGNMWa9rKkRjjUiicNfs/OBfMX1
         cjMg==
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=+mVhcAiKhhMDCYcweAIPYvVHoS3OGDlKw7rdOvOKGWg=;
        b=XZic/dEKK3PlgNq3P+53vtJ8PYLUKDGvGdiPuM6kA5FH0G5yLjAhnxLEEUwzgSHL5p
         df3yxa+Xj2yAbsz+t16bnUE4gF8/vv2BQ5NIsy71xrNdOgb3Fguvepai87T0CvnqtZ93
         M5M5T8sBje8PmqoOl2gWsOJ7wpJlIfoaHLCMegD8YC3mY33yTot5W1Z/S8JS3G2PBIbs
         FlBey3pSwitmEhWX5f/EwPzMQUmehpfWdDXcHCO1Ni6RtgYyx8Z0jpBJPhpXO2xJQNjV
         RPYTJM9Sfoa/bz++uCO0jdUZDnzD02FsQ1gHYjxsF+fh2Q0lL1Ffun+zS2UPvOi6LcRd
         cN3w==
X-Gm-Message-State: AIkVDXJX2smjEIalLoLGrwSg2Ma5Z7kTeHX4FDX5mbS4INqqtE2VS4yYu6D4gXHF7OJNhg==
X-Received: by 10.129.102.5 with SMTP id a5mr12312721ywc.141.1483036342349;
        Thu, 29 Dec 2016 10:32:22 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.54.168 with SMTP id h37ls10171111otc.45.gmail; Thu, 29 Dec
 2016 10:32:21 -0800 (PST)
X-Received: by 10.176.71.86 with SMTP id i22mr19620243uac.31.1483036341436;
        Thu, 29 Dec 2016 10:32:21 -0800 (PST)
Original-Received: from mail-ua0-x233.google.com (mail-ua0-x233.google.com. [2607:f8b0:400c:c08::233])
        by mx.google.com with ESMTPS id a67si13384477vkc.249.2016.12.29.10.32.21
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 29 Dec 2016 10:32:21 -0800 (PST)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:400c:c08::233 as permitted sender) client-ip=2607:f8b0:400c:c08::233;
Original-Received: by mail-ua0-x233.google.com with SMTP id 88so231564723uaq.3
        for <std-proposals@isocpp.org>; Thu, 29 Dec 2016 10:32:21 -0800 (PST)
X-Received: by 10.176.85.24 with SMTP id t24mr34594912uaa.21.1483036341082;
 Thu, 29 Dec 2016 10:32:21 -0800 (PST)
Original-Received: by 10.103.50.74 with HTTP; Thu, 29 Dec 2016 10:32:20 -0800 (PST)
In-Reply-To: <f37c320c-b41b-4f03-b371-acdb496c05ee@isocpp.org>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 ville.voutilainen@gmail.com designates 2607:f8b0:400c:c08::233 as permitted
 sender) smtp.mailfrom=ville.voutilainen@gmail.com;       dmarc=pass (p=NONE
 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-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:30101
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/30101>

On 29 December 2016 at 20:10, Marc <marc.glisse@gmail.com> wrote:
> On Wednesday, December 28, 2016 at 4:42:42 PM UTC+1, Ville Voutilainen
> wrote:
>>
>> On 28 December 2016 at 17:32, Matthew Woehlke <mwoehlk...@gmail.com>
>> wrote:
>> >   template <typename A, typename B>
>> >   auto foo(A a, B b, ...) -> decltype(a * b)
>> >   { ... }
>> >
>> > How would you write a typedef of that? Assume that `A` and/or `B`
>> > *cannot be default constructed*.
>>
>> template <class A, class B> using ab_prod = decltype(declval<A>() *
>> declval<B>());
>
>
> This does not look equivalent to me, declval<A&> would be closer.


Probably. The point being that whether a type is or is not
default-constructible doesn't
hurt the ability to write such a typedef.

-- 
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/CAFk2RUbmHo7zVd1AgpNHMgncJkfFq4EB_JVX10LOK3E1BTSP8A%40mail.gmail.com.

.
