220 21002 <c0711850-454f-432a-86b5-87552f662971@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Aso Renji <asorenji@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: include [[noreturn]] into function signature
Date: Tue, 29 Sep 2015 14:29:33 -0700 (PDT)
Lines: 76
Approved: news@gmane.org
Message-ID: <c0711850-454f-432a-86b5-87552f662971@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_6433_1697807517.1443562173046"
X-Trace: ger.gmane.org 1443562186 718 80.91.229.3 (29 Sep 2015 21:29:46 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 29 Sep 2015 21:29:46 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDSYF7ODTYPBBPMFVSYAKGQEY6VFHIQ@isocpp.org Tue Sep 29 23:29:36 2015
Return-path: <std-proposals+bncBDSYF7ODTYPBBPMFVSYAKGQEY6VFHIQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pd0-f197.google.com ([209.85.192.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDSYF7ODTYPBBPMFVSYAKGQEY6VFHIQ@isocpp.org>)
	id 1Zh2St-0004we-PD
	for gclcip-std-proposals@m.gmane.org; Tue, 29 Sep 2015 23:29:35 +0200
Original-Received: by pdbpr5 with SMTP id pr5sf32309259pdb.2
        for <gclcip-std-proposals@m.gmane.org>; Tue, 29 Sep 2015 14:29:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:subject:mime-version:content-type
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=Ni0aRzjWjffnDP9MRnVCL1pzoruLPkKwRKVCvMsOSbc=;
        b=ST983ywELl4NmYMW9L/wpV9jh54P3OhdP7hnw6qpUFpMM5KyP6tLnH9G2Jh1oWpniz
         56io67ToDusWkJCPshWsp6wShtPL9BSrTtzTv4MYaCS3b7ALvDOZAtedDvE8LYjl2kyq
         vgbdD0ndCNVtkPRe3n5jGdG9ecVi8PCpENdlesNx8aaRt8bMH+pdFC/Mu56PvefjPeqN
         5yNGJYAmG5h2nNI2v05MT5yg4bRVJRQgM2afkdHOTtH2c4ip1MnH8naxsrxstE7acPzZ
         JP3/NvUKPzDYm36CjgtV/ewM7upAhREA6QQ7PHSPuIeeLzP0oWXyEXbXxT2bD4gk1XvA
         cHhA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:subject:mime-version
         :content-type:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=Ni0aRzjWjffnDP9MRnVCL1pzoruLPkKwRKVCvMsOSbc=;
        b=R3rFT3st9yG2Y3oKtGI4CvMRO61MyLvANvFpbNlJoLZg4XTi75I57xNuxWbQuWQNBH
         Od3+Yw3DSuX8WVHa4V76etZD419kVhvudAKTYpwitRRR4Q+eCYOFJLXYJVs7hojt52nL
         LpDF1+aNvaaNt+9ZFmYeuTmuYkXd8p9EytFHKSjiaNVgmN58EGRfMO2G3QnM8+R0Y2yp
         +D7zy3l4LpFnF+DzOTdY0pnOEStrMJga6zit2UdpYhZsUnoiCvrI2WcORPpqHzKI1NIE
         XpY9C79M/ke7OakyC4xyS5XU++yXVuJhMN4LLxoQyThlBY5qLXdthTsrwoaMEjEHwQq0
         mu0A==
X-Gm-Message-State: ALoCoQmkod8FXArfk5fxKNARW9MM3nkQn4ywWzOhbhfVC8XM9y4HQH6zKFkBQjsv9dt1V/mGkfvu
X-Received: by 10.66.182.162 with SMTP id ef2mr154371pac.35.1443562174502;
        Tue, 29 Sep 2015 14:29:34 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.136.29 with SMTP id k29ls58759iod.101.gmail; Tue, 29 Sep
 2015 14:29:33 -0700 (PDT)
X-Received: by 10.50.110.74 with SMTP id hy10mr146158igb.1.1443562173605;
        Tue, 29 Sep 2015 14:29:33 -0700 (PDT)
X-Original-Sender: AsoRenji@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:21002
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/21002>

------=_Part_6433_1697807517.1443562173046
Content-Type: multipart/alternative; 
	boundary="----=_Part_6434_898301163.1443562173046"

------=_Part_6434_898301163.1443562173046
Content-Type: text/plain; charset=UTF-8



Problem:

class parent
{

public:

    virtual int some_method()const{error();}

    [[noreturn]] virtual void error()const=0;
};


class child:public parent

{

     [[noreturn]] void error()const{throw std::runtime_error("Error in 
class child");}
};

[[noreturn]] is not a part of error method signature. So, i have "warning: 
no return statement in function returning non-void" in some_method. 
Proposal - include [[noreturn]] attribute to function signature. Sory if my 
english is bad.

-- 

--- 
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/.

------=_Part_6434_898301163.1443562173046
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><p>Problem:<br></p><p>class parent<br>{</p><p>public:</p><=
p>=C2=A0 =C2=A0 virtual int some_method()const{error();}</p><p>=C2=A0 =C2=
=A0 [[noreturn]] virtual void error()const=3D0;<br>};<br></p><p><br></p><p>=
class child:public parent</p><p>{</p><p>=C2=A0 =C2=A0 =C2=A0[[noreturn]] vo=
id error()const{throw std::runtime_error(&quot;Error in class child&quot;);=
}<br>};<br></p><p>[[noreturn]] is not a part of error method signature. So,=
 i have &quot;warning: no return statement in function returning non-void&q=
uot; in some_method. Proposal - include [[noreturn]] attribute to function =
signature. Sory if my english is bad.</p></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_6434_898301163.1443562173046--
------=_Part_6433_1697807517.1443562173046--

.
