From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21975 invoked by alias); 10 Aug 2017 19:06:47 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 21908 invoked by uid 89); 10 Aug 2017 19:06:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.2 spammy=Prefer X-HELO: mail-it0-f41.google.com Received: from mail-it0-f41.google.com (HELO mail-it0-f41.google.com) (209.85.214.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 10 Aug 2017 19:06:43 +0000 Received: by mail-it0-f41.google.com with SMTP id 76so18037254ith.0 for ; Thu, 10 Aug 2017 12:06:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=YisqOYtAB1mj2O4DcS7dm/35uTJy0hIDHhOkX4btfrc=; b=myiuM4heSrvozo9zvYxYY6shOW/tS5Tbco4vdd9MtpSSUSISLrwMcpzzXtE2gSPvQm 5Dajdj7kzxuK+tGHWT1m6D7on0KbGEgeJr859AUXHoTrMRJS7qhJtaajRkQEEaU20+LF CB8j89Oa6FWeQqoMZTyhyEHP4BnYylo5WodsgoNQgPT4ijv2yxdiE1OId2hHQN1c+vYQ TcOMuMaoEcBWmhXOkdp+jUpOWgDM8wVHKQ2T3bt+tZLMfBiAOncEYhhKatPIR5qJ8bD1 ed0s6amEmYLM21shhKh3Ytvmz/m3qs1YD95UTKCF9Tlt7M0pav7gxv42bj5P1Pf4hoNY 8aAQ== X-Gm-Message-State: AIVw111GXJQxGubqEdiJxLd9T73p99JxnjRPcG7ojMry9mmS5bEDogxm oUuPEALSr+Df0YhBdymvfUlaNuBblBYTtm4= X-Received: by 10.36.167.12 with SMTP id a12mr13098195itf.91.1502392001051; Thu, 10 Aug 2017 12:06:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.63.195 with HTTP; Thu, 10 Aug 2017 12:06:20 -0700 (PDT) From: Jason Merrill Date: Thu, 10 Aug 2017 19:56:00 -0000 Message-ID: Subject: C++ PATCH for c++/80452, Core 1579: implicit move semantics on return/throw To: gcc-patches List Cc: Jonathan Wakely Content-Type: multipart/mixed; boundary="f403045fb15489704d05566ae5b3" X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00761.txt.bz2 --f403045fb15489704d05566ae5b3 Content-Type: text/plain; charset="UTF-8" Content-length: 401 Jon's earlier patch expanded our existing implicit move semantics support to allow other types, but this testcase demonstrates a hole in that support: it didn't affect function template argument deduction. Rather than try to tweak deduction as well as reference binding, this patch actually does overload resolution twice, as specified in the standard. Tested x86_64-pc-linux-gnu, applying to trunk. --f403045fb15489704d05566ae5b3 Content-Type: text/plain; charset="UTF-8"; name="80452.diff" Content-Disposition: attachment; filename="80452.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j66te4j10 Content-length: 11302 Y29tbWl0IDI2ODI4YzAxNzkyNmZjMmIzMmY2YmIzOTk0NjNmMDUyNWIwOGVi YWMKQXV0aG9yOiBKYXNvbiBNZXJyaWxsIDxqYXNvbkByZWRoYXQuY29tPgpE YXRlOiAgIFRodSBBdWcgMTAgMTE6NDc6MjcgMjAxNyAtMDQwMAoKICAgICAg ICAgICAgUFIgYysrLzgwNDUyIC0gQ29yZSAxNTc5LCBpbXBsaWNpdCBtb3Zl IHNlbWFudGljcyBvbiByZXR1cm4vdGhyb3cKICAgIAogICAgICAgICAgICAq IGNwLXRyZWUuaCAoTE9PS1VQX1BSRUZFUl9SVkFMVUUpOiBOb3cgbWVh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