220 34264 <42389eb4-97a9-4a1d-bbfb-c653ba62097f@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Proposal to add constructors to std::bad_alloc
 exception class.
Date: Fri, 1 Sep 2017 16:04:17 -0700 (PDT)
Lines: 1050
Approved: news@gmane.org
Message-ID: <42389eb4-97a9-4a1d-bbfb-c653ba62097f@isocpp.org>
References: <d9001051-0946-4dcf-bf78-8bcdb8302989@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_3111_1365216330.1504307057642"
X-Trace: blaine.gmane.org 1504307063 15876 195.159.176.226 (1 Sep 2017 23:04:23 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 1 Sep 2017 23:04:23 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBB4WOU7GQKGQE3XVB6GY@isocpp.org Sat Sep 02 01:04:17 2017
Return-path: <std-proposals+bncBCEKFTV6ZUMBB4WOU7GQKGQE3XVB6GY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f72.google.com ([209.85.214.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBB4WOU7GQKGQE3XVB6GY@isocpp.org>)
	id 1dnuyy-0003Zo-JQ
	for gclcip-std-proposals@m.gmane.org; Sat, 02 Sep 2017 01:04:13 +0200
Original-Received: by mail-it0-f72.google.com with SMTP id p2sf1480852ite.19
        for <gclcip-std-proposals@m.gmane.org>; Fri, 01 Sep 2017 16:04:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=8cM/3M32hA7nRyo9nQLmq2sdz07QAPTSiD4wlCIgj9g=;
        b=C0nk90NJB9ly7mVpsgsvdBIG+NSp+FaKmICF3pxJqWyM524RJzyVhsZSS74hUhaO9k
         KFEVPi4dGPiVEXHNNaf/mYJX2DmwM7K9fJ5L8c0gLIKcYsDHdgYy/4an86TCnyE30Q0e
         HNVdWyIlO85tpQ9lkZObIKngHjA2m86M/Yc+f4KvJlTnrOrHZHjBSDqNp1v9Ltp48Qzp
         Q5D4/K7fwTb6idABx7JtbyYV4CicWPMoXthgzcJr1/dd6Eh6IqAkSpFcjVGPSsqlFzel
         CKPNRS1yDSFJrDt9peSnGF7ZvaORQks5Cqz1UhnsXy4Nnls2ttJ/PGm0alCnIpaekyz3
         tepQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=8cM/3M32hA7nRyo9nQLmq2sdz07QAPTSiD4wlCIgj9g=;
        b=n/QdQZilbHf6D624T5+Uk9UV1egcwe80/jAv5rzX8sT99CVoGSU/DeDT0Kmxjgd5pz
         GST1361IXGJlkLLDTDheLUdUZO4aMz4yRyZYDcu60swj9Dxhio9H7nSY+AyPn1Vs2mZF
         y6KIo11zpIizldXMXV+ilRxfVdrQJAfkXHEfGE7B+57B+6iNIFe7muccs3zXzjcToMAH
         XxiqJ0u0lsbEizTqsIWBXxMY7FK9cNzT7V0a4ZJcplVInF3iNRKIYBwzZvSGKRyyu2dK
         i+6EbRC8XufKQBns3maY6+RSNUj6d8q3Qvx5uL7qTUpV11aLgJjlHXGgJ9QAbU4XcFy9
         YIGQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version: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=8cM/3M32hA7nRyo9nQLmq2sdz07QAPTSiD4wlCIgj9g=;
        b=OG9lGzVj5eE/A3TxXFQU9YOS5iUFuTzJqAoIvVr1a+V/YVN1pUbMVOlxZaoHfPLSae
         cO78rJy4F1ueUhuXc89MXt4XHcQ3vGx/M76sEK3G18EDu+dnkMavybTRR+cfzrLG2hRp
         BeEcDf0e4n6ZGBoQdH3vS1x5yBzahB0TeR5PCJzJpFRhHgMGxy0XxfNjcNzkcAs4YHM7
         qgugWE264kxTWAgQQUIMgDRjSPrKuCRHFREcaBe3BYYt/lw4MOYiryicpHc20nTJ5dqB
         S9r3MxyEPHoePf2PL+i71+GZmETV4acxEkEFXZ6bsQFdcqtABfd4gHwPHKJSiMesOb0l
         HieA==
X-Gm-Message-State: AHPjjUjmvHJKUvQl9LtNfH5ju5W3fSDfxP6oBJFlASv6Qss+l5ktUoXi
	iAWG4WukP9PmRnyN
X-Google-Smtp-Source: ADKCNb51F0M6lHykzoRB1dfn/QdcDPUHn1nOdwHsH5u480prr8zVyRuJR90R0Ka3/06ErbFSaFOQjA==
X-Received: by 10.36.83.208 with SMTP id n199mr1707703itb.48.1504307059521;
        Fri, 01 Sep 2017 16:04:19 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.38.74 with SMTP id m71ls2446520iom.10.gmail; Fri, 01 Sep
 2017 16:04:18 -0700 (PDT)
X-Received: by 10.31.179.198 with SMTP id c189mr98863vkf.28.1504307058127;
        Fri, 01 Sep 2017 16:04:18 -0700 (PDT)
In-Reply-To: <d9001051-0946-4dcf-bf78-8bcdb8302989@isocpp.org>
X-Original-Sender: jmckesson@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:34264
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/34264>

------=_Part_3111_1365216330.1504307057642
Content-Type: multipart/alternative; 
	boundary="----=_Part_3112_740863468.1504307057644"

------=_Part_3112_740863468.1504307057644
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Friday, September 1, 2017 at 3:28:44 PM UTC-4, Rich Sposato wrote:
>
> III.  Motivation=20
>
>
> There are several motivations for this proposal. Each of these will be=20
> described in detail.
>
> 1.      Conformance to existing exception classes.
>
> 2.      Ease of making templates that construct exceptions.
>
> 3.      Ease of deriving subclasses from exception classes.
>
> 4.      Changes to C++17 new and delete operators.
>
> 5.      Allowing allocators to inform callers exactly why allocations=20
> failed.
>

Overall, I find your proposal poorly motivated. See below for details. But=
=20
this proposal needs better motivation for its existence.
=20

>  1*.      **Conformance to existing exception classes.*
>
>
> All other exception classes in the std namespace provide constructors tha=
t=20
> accept either a single parameter of either a reference to a const=20
> std::string or a pointer to a C-style string. The parameter provides a=20
> human-readable explanation for why the program threw an exception or=20
> actionable information allowing the calling code to correct the problem.
>
> =C2=B7         logic_error
>
> =C2=B7         invalid_argument
>
> =C2=B7         domain_error
>
> =C2=B7         length_error
>
> =C2=B7         out_of_range
>
> =C2=B7         runtime_error
>
> =C2=B7         range_error
>
> =C2=B7         overflow_error
>
> =C2=B7         underflow_error
>
> =C2=B7         tx_exception
>
>
> Conformance to other exception classes will enable motivations two and=20
> three for this proposal.
>

As others have pointed out, `std::bad_alloc` is special because it is due=
=20
to exactly the kind of failure that your API simply cannot handle: the=20
ability to allocate memory.

For the rest of my examinations, I will assume that the API is such that it=
=20
takes a bare `const char*`, and passes it on directly, with the expectation=
=20
being that you will ensure that the memory being pointed to will live to=20
the catch site. Because without that, I'm fairly sure your proposal is=20
essentially DOA.

*2.      **Ease of making templates that construct exceptions.*
>
> *3.      **Ease of deriving subclasses from exception classes.*
>
>
> Motivations #2 and #3 are related.
>
They can be explained with a single example that uses both templates and=20
> inheritance to show why bad_alloc constructors should accept an explanato=
ry=20
> string parameter.
>
>
> Classes that derive from the standard exceptions cannot call the bad_allo=
c=20
> constructor using the same code they would to call other exception classe=
s.=20
> This example illustrates how to wrap existing exception classes with a=20
> smart-exception class that derives from standard exceptions.
>
>
> template < class ExceptionType >
>
> class SmartException
>
> {
>
> public:
>
>       SmartException( const char * message,
>
> unsigned int line, const char * function ) :
>
>             *ExceptionType( message ),*
>
>             line_( line ),
>
>             functionName_( function )
>
>       {}
>
>       // ... rest of class ...
>
> private:
>
>       unsigned int line_;
>
>       const char * functionName_;
>
> };
>
>
> The SmartException constructor will call a subclass constructor that=20
> accepts a string parameter. This works for most exceptions, but not=20
> bad_alloc.
>

Here's a much better version, one that can work with *any* exception class=
=20
type, not just the ones that take a string:

template<class Exception>
class LocalizedException : Exception
{
  template<typename ...Args>
  LocalizedException(unsigned int line, const char * function, Args &&args)

    : Exception(std::forward<Args>(args)...)
    , line_(line)
    , function_(function)

  {}

};

Now, isn't that much better? You're not forcing yourself into this=20
erroneous "all exceptions take strings when constructed" assumption. You=20
can work with other types, those that have their own messages or whatever.

*4.      **Changes to C++17 new and delete operators.*
>
>
> There are several additional new and delete operators in the C++17=20
> standard. The additional operators all have a std::align_val_t parameter =
to=20
> support alignment-aware allocators. The std::align_val_t parameter will=
=20
> become part of class-specific new and delete operators along with the=20
> global operators.
>
>
> void * operator new( std::size_t count, std::align_val_t al);
>
> void * operator new[]( std::size_t count, std::align_val_t al);
>
> void operator delete( void * ptr, std::size_t sz, std::align_val_t al );
>
> void operator delete[]( void * ptr, std::size_t sz, std::align_val_t al )=
;
>
> =20
>
> Alignment-aware allocators would be unable to allocate the required numbe=
r=20
> of bytes if the alignment is incorrect. (e.g. =E2=80=93 The caller reques=
ts=20
> alignment on 16 byte boundaries, but the allocator only supports alignmen=
t=20
> on 4 or 8 byte boundaries.) If the allocator throws a bad_alloc exception=
=20
> for the invalid alignment, the caller may assume the program is out of=20
> memory instead of assuming the alignment is incorrect. Such a caller may=
=20
> call a new_handler believing it will make more memory available. A=20
> new_handler could spend an enormous amount of time looking for memory tha=
t=20
> is available only to find none, simply throw another bad_alloc exception,=
=20
> or terminate the program by calling std::abort or std::exit. None of thes=
e=20
> actions will resolve the simple problem of using the correct alignment.
>

That sounds like a good reason to separate `bad_alloc` from=20
`bad_alignment`. What we *don't* want is for users to try to do this:

catch(std::bad_alloc &e)
{
  if(e.what() =3D=3D ...)
  {
    //Handle bad alignment
  }
  else
  {
    //Handle OOM.
  }
}

That's two catch statements macarading as one. That's bad coding.
=20

> *5.      **Allowing allocators to inform callers exactly why allocations=
=20
> failed.*
>
>
> Allocations may fail for reasons other than the program ran out memory.=
=20
> There are specialized allocators that only handle requests for specific=
=20
> sizes, such as pool allocators, that could throw exceptions if they recei=
ve=20
> requests for sizes they cannot handle.
>
>
> This example shows how an allocator might throw a bad_alloc exception wit=
h=20
> actionable information.
>
>
> void * PoolAllocator::Allocate( std::size_t bytes, std::align_val_t=20
> alignment )
>
> {
>
>       if ( ( bytes < minAllowedSize ) || ( maxAllowedSize < bytes ) )
>
>       {
>
>             throw *SmartBadAllocException(*
>
> *=E2=80=9CError! This allocator only handles allocations from 16 through =
64 bytes=20
> in size.=E2=80=9D, __LINE__, __FUNCTION__ );*
>
>       }
>
>       if ( !IsValidAlignment( alignment ) )
>
>       {
>
>             throw *SmartBadAllocException(*
>
> *=E2=80=9CError! This allocator only handles alignments on 4 byte boundar=
ies.=E2=80=9D,=20
> __LINE__, __FUNCTION__ );*
>
>       }
>
>       void * place =3D FindPlace( bytes, alignment );
>
>       if ( place =3D=3D nullptr )
>
>       {
>
>             throw SmartBadAlloc( =E2=80=9CError! Unable to allocate bytes=
..=E2=80=9D,
>
>                   __LINE__, __FUNCTION__ );
>
>       }
>
>       return place;
>
> }
>

Unless you write an English language parser to figure out what those mean,=
=20
the only "actionable" thing that can be done is by the *programmer* (aka:=
=20
spitting the message out to the log), not by the program itself.

The only way to make this detectable by the program itself is to have it=20
throw something other than (or more than) `bad_alloc`. None of which=20
requires playing games with its string.
=20

--=20
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 e=
mail 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/42389eb4-97a9-4a1d-bbfb-c653ba62097f%40isocpp.or=
g.

------=_Part_3112_740863468.1504307057644
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Friday, September 1, 2017 at 3:28:44 PM UTC-4, Rich Spo=
sato wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left=
: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;" zoompage-fontsize=
=3D"13"><div dir=3D"ltr" zoompage-fontsize=3D"13"><h1 zoompage-fontsize=3D"=
16"><a name=3D"d9001051-0946-4dcf-bf78-8bcdb8302989@isocpp.org__Toc49203062=
9" zoompage-fontsize=3D"16"><span zoompage-fontsize=3D"16"><span zoompage-f=
ontsize=3D"16">III.<span style=3D"font:7.0pt &quot;Times New Roman&quot;" z=
oompage-fontsize=3D"9">=C2=A0 </span></span></span><span zoompage-fontsize=
=3D"16">Motivation</span></a><span zoompage-fontsize=3D"16"></span></h1>

<p class=3D"MsoNormal" style=3D"line-height:normal" zoompage-fontsize=3D"13=
"><span style=3D"font-size:12.0pt;font-family:&quot;Times New Roman&quot;,s=
erif" zoompage-fontsize=3D"16"><br></span></p><p class=3D"MsoNormal" style=
=3D"line-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:1=
2.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fontsize=3D"1=
6">There are several motivations for
this proposal. Each of these will be described in detail.</span></p>

<p style=3D"line-height:normal" zoompage-fontsize=3D"13"><span style=3D"fon=
t-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fonts=
ize=3D"16"><span zoompage-fontsize=3D"16">1.<span style=3D"font:7.0pt &quot=
;Times New Roman&quot;" zoompage-fontsize=3D"9">=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0
</span></span></span><span style=3D"font-size:12.0pt;font-family:&quot;Time=
s New Roman&quot;,serif" zoompage-fontsize=3D"16">Conformance to existing e=
xception
classes.</span></p>

<p style=3D"line-height:normal" zoompage-fontsize=3D"13"><span style=3D"fon=
t-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fonts=
ize=3D"16"><span zoompage-fontsize=3D"16">2.<span style=3D"font:7.0pt &quot=
;Times New Roman&quot;" zoompage-fontsize=3D"9">=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0
</span></span></span><span style=3D"font-size:12.0pt;font-family:&quot;Time=
s New Roman&quot;,serif" zoompage-fontsize=3D"16">Ease of making templates =
that
construct exceptions.</span></p>

<p style=3D"line-height:normal" zoompage-fontsize=3D"13"><span style=3D"fon=
t-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fonts=
ize=3D"16"><span zoompage-fontsize=3D"16">3.<span style=3D"font:7.0pt &quot=
;Times New Roman&quot;" zoompage-fontsize=3D"9">=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0
</span></span></span><span style=3D"font-size:12.0pt;font-family:&quot;Time=
s New Roman&quot;,serif" zoompage-fontsize=3D"16">Ease of deriving subclass=
es from
exception classes.</span></p>

<p style=3D"line-height:normal" zoompage-fontsize=3D"13"><span style=3D"fon=
t-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fonts=
ize=3D"16"><span zoompage-fontsize=3D"16">4.<span style=3D"font:7.0pt &quot=
;Times New Roman&quot;" zoompage-fontsize=3D"9">=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0
</span></span></span><span style=3D"font-size:12.0pt;font-family:&quot;Time=
s New Roman&quot;,serif" zoompage-fontsize=3D"16">Changes to C++17 new and =
delete
operators.</span></p>

<p style=3D"line-height:normal" zoompage-fontsize=3D"13"><span style=3D"fon=
t-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fonts=
ize=3D"16"><span zoompage-fontsize=3D"16">5.<span style=3D"font:7.0pt &quot=
;Times New Roman&quot;" zoompage-fontsize=3D"9">=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0
</span></span></span><span style=3D"font-size:12.0pt;font-family:&quot;Time=
s New Roman&quot;,serif" zoompage-fontsize=3D"16">Allowing allocators to in=
form
callers exactly why allocations failed.</span></p></div></blockquote><div z=
oompage-fontsize=3D"13"><br></div><div zoompage-fontsize=3D"13">Overall, I =
find your proposal poorly motivated. See below for details. But this propos=
al needs better motivation for its existence.<br></div><div zoompage-fontsi=
ze=3D"13">=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin: 0;=
margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;" zoompage=
-fontsize=3D"13"><div dir=3D"ltr" zoompage-fontsize=3D"13">

<p style=3D"line-height:normal" zoompage-fontsize=3D"13"><span style=3D"fon=
t-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fonts=
ize=3D"16">=C2=A0</span>1<b zoompage-fontsize=3D"13"><span style=3D"font-si=
ze:12.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fontsize=
=3D"16"><span zoompage-fontsize=3D"16">.<span style=3D"font:7.0pt &quot;Tim=
es New Roman&quot;" zoompage-fontsize=3D"9">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span></span></b><b zoompage-fontsize=3D"13"><span style=3D"font-si=
ze:12.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fontsize=
=3D"16">Conformance to existing exception classes.</span></b></p>

<p class=3D"MsoNormal" style=3D"line-height:normal" zoompage-fontsize=3D"13=
"><span style=3D"font-size:12.0pt;font-family:&quot;Times New Roman&quot;,s=
erif" zoompage-fontsize=3D"16"><br></span></p><p class=3D"MsoNormal" style=
=3D"line-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:1=
2.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fontsize=3D"1=
6">All other exception classes in the std
namespace provide constructors that accept either a single parameter of eit=
her
a reference to a const std::string or a pointer to a C-style string. The
parameter provides a human-readable explanation for why the program threw a=
n
exception or actionable information allowing the calling code to correct th=
e
problem.</span></p>

<p style=3D"margin-bottom:0in;margin-bottom:.0001pt;line-height:normal" zoo=
mpage-fontsize=3D"13"><span style=3D"font-size:10.0pt;font-family:Symbol" z=
oompage-fontsize=3D"13"><span zoompage-fontsize=3D"13">=C2=B7<span style=3D=
"font:7.0pt &quot;Times New Roman&quot;" zoompage-fontsize=3D"9">=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span></span><span style=3D"font-size:10.0pt;font-family:&quot;Cour=
ier New&quot;" zoompage-fontsize=3D"13">logic_error</span></p>

<p style=3D"margin-bottom:0in;margin-bottom:.0001pt;line-height:normal" zoo=
mpage-fontsize=3D"13"><span style=3D"font-size:10.0pt;font-family:Symbol" z=
oompage-fontsize=3D"13"><span zoompage-fontsize=3D"13">=C2=B7<span style=3D=
"font:7.0pt &quot;Times New Roman&quot;" zoompage-fontsize=3D"9">=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span></span><span style=3D"font-size:10.0pt;font-family:&quot;Cour=
ier New&quot;" zoompage-fontsize=3D"13">invalid_argument</span></p>

<p style=3D"margin-bottom:0in;margin-bottom:.0001pt;line-height:normal" zoo=
mpage-fontsize=3D"13"><span style=3D"font-size:10.0pt;font-family:Symbol" z=
oompage-fontsize=3D"13"><span zoompage-fontsize=3D"13">=C2=B7<span style=3D=
"font:7.0pt &quot;Times New Roman&quot;" zoompage-fontsize=3D"9">=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span></span><span style=3D"font-size:10.0pt;font-family:&quot;Cour=
ier New&quot;" zoompage-fontsize=3D"13">domain_error</span></p>

<p style=3D"margin-bottom:0in;margin-bottom:.0001pt;line-height:normal" zoo=
mpage-fontsize=3D"13"><span style=3D"font-size:10.0pt;font-family:Symbol" z=
oompage-fontsize=3D"13"><span zoompage-fontsize=3D"13">=C2=B7<span style=3D=
"font:7.0pt &quot;Times New Roman&quot;" zoompage-fontsize=3D"9">=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span></span><span style=3D"font-size:10.0pt;font-family:&quot;Cour=
ier New&quot;" zoompage-fontsize=3D"13">length_error</span></p>

<p style=3D"margin-bottom:0in;margin-bottom:.0001pt;line-height:normal" zoo=
mpage-fontsize=3D"13"><span style=3D"font-size:10.0pt;font-family:Symbol" z=
oompage-fontsize=3D"13"><span zoompage-fontsize=3D"13">=C2=B7<span style=3D=
"font:7.0pt &quot;Times New Roman&quot;" zoompage-fontsize=3D"9">=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span></span><span style=3D"font-size:10.0pt;font-family:&quot;Cour=
ier New&quot;" zoompage-fontsize=3D"13">out_of_range</span></p>

<p style=3D"margin-bottom:0in;margin-bottom:.0001pt;line-height:normal" zoo=
mpage-fontsize=3D"13"><span style=3D"font-size:10.0pt;font-family:Symbol" z=
oompage-fontsize=3D"13"><span zoompage-fontsize=3D"13">=C2=B7<span style=3D=
"font:7.0pt &quot;Times New Roman&quot;" zoompage-fontsize=3D"9">=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span></span><span style=3D"font-size:10.0pt;font-family:&quot;Cour=
ier New&quot;" zoompage-fontsize=3D"13">runtime_error</span></p>

<p style=3D"margin-bottom:0in;margin-bottom:.0001pt;line-height:normal" zoo=
mpage-fontsize=3D"13"><span style=3D"font-size:10.0pt;font-family:Symbol" z=
oompage-fontsize=3D"13"><span zoompage-fontsize=3D"13">=C2=B7<span style=3D=
"font:7.0pt &quot;Times New Roman&quot;" zoompage-fontsize=3D"9">=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span></span><span style=3D"font-size:10.0pt;font-family:&quot;Cour=
ier New&quot;" zoompage-fontsize=3D"13">range_error</span></p>

<p style=3D"margin-bottom:0in;margin-bottom:.0001pt;line-height:normal" zoo=
mpage-fontsize=3D"13"><span style=3D"font-size:10.0pt;font-family:Symbol" z=
oompage-fontsize=3D"13"><span zoompage-fontsize=3D"13">=C2=B7<span style=3D=
"font:7.0pt &quot;Times New Roman&quot;" zoompage-fontsize=3D"9">=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span></span><span style=3D"font-size:10.0pt;font-family:&quot;Cour=
ier New&quot;" zoompage-fontsize=3D"13">overflow_error</span></p>

<p style=3D"margin-bottom:0in;margin-bottom:.0001pt;line-height:normal" zoo=
mpage-fontsize=3D"13"><span style=3D"font-size:10.0pt;font-family:Symbol" z=
oompage-fontsize=3D"13"><span zoompage-fontsize=3D"13">=C2=B7<span style=3D=
"font:7.0pt &quot;Times New Roman&quot;" zoompage-fontsize=3D"9">=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span></span><span style=3D"font-size:10.0pt;font-family:&quot;Cour=
ier New&quot;" zoompage-fontsize=3D"13">underflow_error</span></p>

<p style=3D"margin-bottom:0in;margin-bottom:.0001pt;line-height:normal" zoo=
mpage-fontsize=3D"13"><span style=3D"font-size:10.0pt;font-family:Symbol" z=
oompage-fontsize=3D"13"><span zoompage-fontsize=3D"13">=C2=B7<span style=3D=
"font:7.0pt &quot;Times New Roman&quot;" zoompage-fontsize=3D"9">=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span></span><span style=3D"font-size:10.0pt;font-family:&quot;Cour=
ier New&quot;" zoompage-fontsize=3D"13">tx_exception</span></p>

<p class=3D"MsoNormal" style=3D"line-height:normal" zoompage-fontsize=3D"13=
"><span style=3D"font-size:12.0pt;font-family:&quot;Times New Roman&quot;,s=
erif" zoompage-fontsize=3D"16"><br></span></p><p class=3D"MsoNormal" style=
=3D"line-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:1=
2.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fontsize=3D"1=
6">Conformance to other exception
classes will enable motivations two and three for this proposal.</span></p>=
</div></blockquote><div zoompage-fontsize=3D"13"><br></div><div zoompage-fo=
ntsize=3D"13">As others have pointed out, `std::bad_alloc` is special becau=
se it is due to exactly the kind of failure that your API simply cannot han=
dle: the ability to allocate memory.</div><div zoompage-fontsize=3D"13"><br=
></div><div zoompage-fontsize=3D"13">For the rest of my examinations, I wil=
l assume that the API is such that it takes a bare `const char*`, and passe=
s it on directly, with the expectation being that you will ensure that the =
memory being pointed to will live to the catch site. Because without that, =
I&#39;m fairly sure your proposal is essentially DOA.<br></div><div zoompag=
e-fontsize=3D"13"><br></div><blockquote class=3D"gmail_quote" style=3D"marg=
in: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;" zo=
ompage-fontsize=3D"13"><div dir=3D"ltr" zoompage-fontsize=3D"13">

<p class=3D"MsoNormal" style=3D"line-height:normal" zoompage-fontsize=3D"13=
"><span style=3D"font-size:12.0pt;font-family:&quot;Times New Roman&quot;,s=
erif" zoompage-fontsize=3D"16"></span></p>

<p style=3D"line-height:normal" zoompage-fontsize=3D"13"><b zoompage-fontsi=
ze=3D"13"><span style=3D"font-size:12.0pt;font-family:&quot;Times New Roman=
&quot;,serif" zoompage-fontsize=3D"16"><span zoompage-fontsize=3D"16">2.<sp=
an style=3D"font:7.0pt &quot;Times New Roman&quot;" zoompage-fontsize=3D"9"=
>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span></span></b><b zoompage-fontsize=3D"13"><span style=3D"font-si=
ze:12.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fontsize=
=3D"16">Ease of making templates that construct exceptions.</span></b></p>

<p style=3D"line-height:normal" zoompage-fontsize=3D"13"><b zoompage-fontsi=
ze=3D"13"><span style=3D"font-size:12.0pt;font-family:&quot;Times New Roman=
&quot;,serif" zoompage-fontsize=3D"16"><span zoompage-fontsize=3D"16">3.<sp=
an style=3D"font:7.0pt &quot;Times New Roman&quot;" zoompage-fontsize=3D"9"=
>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span></span></b><b zoompage-fontsize=3D"13"><span style=3D"font-si=
ze:12.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fontsize=
=3D"16">Ease of deriving subclasses from exception classes.</span></b></p>

<p class=3D"MsoNormal" style=3D"line-height:normal" zoompage-fontsize=3D"13=
"><span style=3D"font-size:12.0pt;font-family:&quot;Times New Roman&quot;,s=
erif" zoompage-fontsize=3D"16"><br></span></p><p class=3D"MsoNormal" style=
=3D"line-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:1=
2.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fontsize=3D"1=
6">Motivations #2 and #3 are related.</span></p></div></blockquote><div zoo=
mpage-fontsize=3D"13"></div><blockquote class=3D"gmail_quote" style=3D"marg=
in: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;" zo=
ompage-fontsize=3D"13"><div dir=3D"ltr" zoompage-fontsize=3D"13"><p class=
=3D"MsoNormal" style=3D"line-height:normal" zoompage-fontsize=3D"13"><span =
style=3D"font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif" zo=
ompage-fontsize=3D"16">They can be explained with a single example that use=
s both templates and
inheritance to show why bad_alloc constructors should accept an explanatory
string parameter.</span></p>

<p class=3D"MsoNormal" style=3D"line-height:normal" zoompage-fontsize=3D"13=
"><span style=3D"font-size:12.0pt;font-family:&quot;Times New Roman&quot;,s=
erif" zoompage-fontsize=3D"16"><br></span></p><p class=3D"MsoNormal" style=
=3D"line-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:1=
2.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fontsize=3D"1=
6">Classes that derive from the
standard exceptions cannot call the bad_alloc constructor using the same co=
de
they would to call other exception classes. This example illustrates how to=
 wrap
existing exception classes with a smart-exception class that derives from
standard exceptions.</span></p><p class=3D"MsoNormal" style=3D"line-height:=
normal" zoompage-fontsize=3D"13"><span style=3D"font-size:12.0pt;font-famil=
y:&quot;Times New Roman&quot;,serif" zoompage-fontsize=3D"16"><br></span></=
p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13">template &lt; =
class
ExceptionType &gt;</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13">class SmartExc=
eption</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13">{</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13">public:</span>=
</p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>SmartException( cons=
t char * message,</span></p>

<p class=3D"MsoNormal" style=3D"margin-top:0in;margin-right:0in;margin-bott=
om:0in;margin-left:.5in;margin-bottom:.0001pt;text-indent:.5in;line-height:=
normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;font-famil=
y:&quot;Courier New&quot;" zoompage-fontsize=3D"13">unsigned int line, cons=
t char *
function ) :</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 </span><b zoompage-fontsize=3D"13"><span style=3D"color:red" zoom=
page-fontsize=3D"13">ExceptionType( message ),</span></b></span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 </span>line_( line ),</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 </span>functionName_( function )</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>{}</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>// ... rest of class=
 ...</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13">private:</span=
></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>unsigned int line_;<=
/span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>const char * functio=
nName_;</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13">};</span></p>

<p class=3D"MsoNormal" style=3D"line-height:normal" zoompage-fontsize=3D"13=
"><span style=3D"font-size:12.0pt;font-family:&quot;Times New Roman&quot;,s=
erif" zoompage-fontsize=3D"16"><br></span></p><p class=3D"MsoNormal" style=
=3D"line-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:1=
2.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fontsize=3D"1=
6">The SmartException constructor will
call a subclass constructor that accepts a string parameter. This works for
most exceptions, but not bad_alloc.</span></p></div></blockquote><div zoomp=
age-fontsize=3D"13"><br></div><div zoompage-fontsize=3D"13">Here&#39;s a mu=
ch better version, one that can work with <i zoompage-fontsize=3D"13">any</=
i> exception class type, not just the ones that take a string:</div><div zo=
ompage-fontsize=3D"13"><br></div><div style=3D"background-color: rgb(250, 2=
50, 250); border-color: rgb(187, 187, 187); border-style: solid; border-wid=
th: 1px; overflow-wrap: break-word;" class=3D"prettyprint" zoompage-fontsiz=
e=3D"13"><code class=3D"prettyprint" zoompage-fontsize=3D"13"><div class=3D=
"subprettyprint" zoompage-fontsize=3D"13"><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">template</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">&lt;</span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">class</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> </span><span style=3D"color: #606;" class=3D"styled-by-pretti=
fy">Exception</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br=
></span><span style=3D"color: #008;" class=3D"styled-by-prettify">class</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span =
style=3D"color: #606;" class=3D"styled-by-prettify">LocalizedException</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #60=
6;" class=3D"styled-by-prettify">Exception</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br>=C2=A0 </span><span style=3D"color: #008;" class=3D"st=
yled-by-prettify">template</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">&lt;</span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">typename</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">.=
...</span><span style=3D"color: #606;" class=3D"styled-by-prettify">Args</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 </span><s=
pan style=3D"color: #606;" class=3D"styled-by-prettify">LocalizedException<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><sp=
an style=3D"color: #008;" class=3D"styled-by-prettify">unsigned</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D=
"color: #008;" class=3D"styled-by-prettify">int</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"> line</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">const</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify"=
>char</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">*</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"=
color: #008;" class=3D"styled-by-prettify">function</span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606;" class=
=3D"styled-by-prettify">Args</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">&amp;&amp;</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify">args</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">)</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br><b=
r>=C2=A0 =C2=A0 </span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">:</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </=
span><span style=3D"color: #606;" class=3D"styled-by-prettify">Exception</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify">std</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify">forward</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;"=
 class=3D"styled-by-prettify">Args</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">&gt;(</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify">args</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">)...)</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> line_</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">line</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> function_</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D=
"color: #008;" class=3D"styled-by-prettify">function</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">)</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"><br><br>=C2=A0 </span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">{}</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"><br><br></span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">};</span></div></code></div><div zoompage-fonts=
ize=3D"13"><br></div><div zoompage-fontsize=3D"13"></div><div zoompage-font=
size=3D"13">Now, isn&#39;t that much better? You&#39;re not forcing yoursel=
f into this erroneous &quot;all exceptions take strings when constructed&qu=
ot; assumption. You can work with other types, those that have their own me=
ssages or whatever.<br></div><div zoompage-fontsize=3D"13"><br></div><block=
quote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-le=
ft: 1px #ccc solid;padding-left: 1ex;" zoompage-fontsize=3D"13"><div dir=3D=
"ltr" zoompage-fontsize=3D"13"><p class=3D"MsoNormal" style=3D"line-height:=
normal" zoompage-fontsize=3D"13"><span style=3D"font-size:12.0pt;font-famil=
y:&quot;Times New Roman&quot;,serif" zoompage-fontsize=3D"16"></span></p>

<p style=3D"line-height:normal" zoompage-fontsize=3D"13"><b zoompage-fontsi=
ze=3D"13"><span style=3D"font-size:12.0pt;font-family:&quot;Times New Roman=
&quot;,serif" zoompage-fontsize=3D"16"><span zoompage-fontsize=3D"16">4.<sp=
an style=3D"font:7.0pt &quot;Times New Roman&quot;" zoompage-fontsize=3D"9"=
>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
</span></span></span></b><b zoompage-fontsize=3D"13"><span style=3D"font-si=
ze:12.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fontsize=
=3D"16">Changes to C++17 new and delete operators.</span></b></p>

<p class=3D"MsoNormal" zoompage-fontsize=3D"13"><span style=3D"font-size:12=
..0pt;line-height:107%;font-family:&quot;Times New Roman&quot;,serif" zoompa=
ge-fontsize=3D"16"><br></span></p><p class=3D"MsoNormal" zoompage-fontsize=
=3D"13"><span style=3D"font-size:12.0pt;line-height:107%;font-family:&quot;=
Times New Roman&quot;,serif" zoompage-fontsize=3D"16">There are
several additional new and delete operators in the C++17 standard. The
additional operators all have a std::align_val_t parameter to support
alignment-aware allocators. The std::align_val_t parameter will become part=
 of
class-specific new and delete operators along with the global operators.</s=
pan></p><p class=3D"MsoNormal" zoompage-fontsize=3D"13"><span style=3D"font=
-size:12.0pt;line-height:107%;font-family:&quot;Times New Roman&quot;,serif=
" zoompage-fontsize=3D"16"><br></span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt" zo=
ompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;line-height:107%;fon=
t-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13">void * operator =
new(
std::size_t count, std::align_val_t al);</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt" zo=
ompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;line-height:107%;fon=
t-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13">void * operator =
new[](
std::size_t count, std::align_val_t al);</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13">void operator =
delete( void
* ptr, std::size_t sz, std::align_val_t al );</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13">void operator
delete[]( void * ptr, std::size_t sz, std::align_val_t al );</span></p>

<p class=3D"MsoNormal" zoompage-fontsize=3D"13"><span style=3D"font-size:12=
..0pt;line-height:107%;font-family:&quot;Times New Roman&quot;,serif" zoompa=
ge-fontsize=3D"16">=C2=A0</span></p>

<p class=3D"MsoNormal" zoompage-fontsize=3D"13"><span style=3D"font-size:12=
..0pt;line-height:107%;font-family:&quot;Times New Roman&quot;,serif" zoompa=
ge-fontsize=3D"16">Alignment-aware
allocators would be unable to allocate the required number of bytes if the
alignment is incorrect. (e.g. =E2=80=93 The caller requests alignment on 16=
 byte
boundaries, but the allocator only supports alignment on 4 or 8 byte
boundaries.) If the allocator throws a bad_alloc exception for the invalid
alignment, the caller may assume the program is out of memory instead of
assuming the alignment is incorrect. Such a caller may call a new_handler b=
elieving
it will make more memory available. A new_handler could spend an enormous
amount of time looking for memory that is available only to find none, simp=
ly
throw another bad_alloc exception, or terminate the program by calling
std::abort or std::exit. None of these actions will resolve the simple prob=
lem
of using the correct alignment.</span></p></div></blockquote><div zoompage-=
fontsize=3D"13"><br></div><div zoompage-fontsize=3D"13">That sounds like a =
good reason to separate `bad_alloc` from `bad_alignment`. What we <i zoompa=
ge-fontsize=3D"13">don&#39;t</i> want is for users to try to do this:</div>=
<div zoompage-fontsize=3D"13"><br></div><div style=3D"background-color: rgb=
(250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; bor=
der-width: 1px; overflow-wrap: break-word;" class=3D"prettyprint" zoompage-=
fontsize=3D"13"><code class=3D"prettyprint" zoompage-fontsize=3D"13"><div c=
lass=3D"subprettyprint" zoompage-fontsize=3D"13"><span style=3D"color: #008=
;" class=3D"styled-by-prettify">catch</span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify">std</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">::</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y">bad_alloc </span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">&amp;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">e<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"><br>=C2=A0 </span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">if</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">(</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">e</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">.</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify">what</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
()</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">=3D=3D</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">...)</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"><br>=C2=A0 </span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"co=
lor: #800;" class=3D"styled-by-prettify">//Handle bad alignment</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 </span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">}</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 </span><span styl=
e=3D"color: #008;" class=3D"styled-by-prettify">else</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"><br>=C2=A0 </span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"c=
olor: #800;" class=3D"styled-by-prettify">//Handle OOM.</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 </span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">}</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">}</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br></span></div></code></div><div zoompage-fontsiz=
e=3D"13"><br>That&#39;s two catch statements macarading as one. That&#39;s =
bad coding.<br></div><div zoompage-fontsize=3D"13">=C2=A0</div><blockquote =
class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1p=
x #ccc solid;padding-left: 1ex;" zoompage-fontsize=3D"13"><div dir=3D"ltr" =
zoompage-fontsize=3D"13"><p class=3D"MsoNormal" zoompage-fontsize=3D"13"><s=
pan style=3D"font-size:12.0pt;line-height:107%;font-family:&quot;Times New =
Roman&quot;,serif" zoompage-fontsize=3D"16"></span></p><p style=3D"line-hei=
ght:normal" zoompage-fontsize=3D"13"><b zoompage-fontsize=3D"13"><span styl=
e=3D"font-size:12.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompa=
ge-fontsize=3D"16"><span zoompage-fontsize=3D"16">5.<span style=3D"font:7.0=
pt &quot;Times New Roman&quot;" zoompage-fontsize=3D"9">=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0
</span></span></span></b><b zoompage-fontsize=3D"13"><span style=3D"font-si=
ze:12.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fontsize=
=3D"16">Allowing allocators to inform callers exactly why
allocations failed.</span></b></p>

<p class=3D"MsoNormal" style=3D"line-height:normal" zoompage-fontsize=3D"13=
"><span style=3D"font-size:12.0pt;font-family:&quot;Times New Roman&quot;,s=
erif" zoompage-fontsize=3D"16"><br></span></p><p class=3D"MsoNormal" style=
=3D"line-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:1=
2.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fontsize=3D"1=
6">Allocations may fail for reasons
other than the program ran out memory. There are specialized allocators tha=
t
only handle requests for specific sizes, such as pool allocators, that coul=
d
throw exceptions if they receive requests for sizes they cannot handle.</sp=
an></p>

<p class=3D"MsoNormal" style=3D"line-height:normal" zoompage-fontsize=3D"13=
"><span style=3D"font-size:12.0pt;font-family:&quot;Times New Roman&quot;,s=
erif" zoompage-fontsize=3D"16"><br></span></p><p class=3D"MsoNormal" style=
=3D"line-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:1=
2.0pt;font-family:&quot;Times New Roman&quot;,serif" zoompage-fontsize=3D"1=
6">This example shows how an allocator
might throw a bad_alloc exception with actionable information.</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><br></span></p=
><p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;li=
ne-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;=
font-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13">void * PoolAl=
locator::Allocate(
std::size_t bytes, std::align_val_t alignment )</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13">{</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>if ( ( bytes &lt; mi=
nAllowedSize ) || (
maxAllowedSize &lt; bytes ) )</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>{</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 </span>throw <b zoompage-fontsize=3D"13"><span style=3D"color:red=
" zoompage-fontsize=3D"13">SmartBadAllocException(</span></b></span></p>

<p class=3D"MsoNormal" style=3D"margin-top:0in;margin-right:0in;margin-bott=
om:0in;margin-left:1.0in;margin-bottom:.0001pt;text-indent:.5in;line-height=
:normal" zoompage-fontsize=3D"13"><b zoompage-fontsize=3D"13"><span style=
=3D"font-size:10.0pt;font-family:&quot;Courier New&quot;;color:red" zoompag=
e-fontsize=3D"13">=E2=80=9CError! This allocator only handles allocations f=
rom 16 through 64
bytes in size.=E2=80=9D, __LINE__, __FUNCTION__ );</span></b></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>}</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>if ( !IsValidAlignme=
nt( alignment ) )</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>{</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 </span>throw <b zoompage-fontsize=3D"13"><span style=3D"color:red=
" zoompage-fontsize=3D"13">SmartBadAllocException(</span></b></span></p>

<p class=3D"MsoNormal" style=3D"margin-top:0in;margin-right:0in;margin-bott=
om:0in;margin-left:1.0in;margin-bottom:.0001pt;text-indent:.5in;line-height=
:normal" zoompage-fontsize=3D"13"><b zoompage-fontsize=3D"13"><span style=
=3D"font-size:10.0pt;font-family:&quot;Courier New&quot;;color:red" zoompag=
e-fontsize=3D"13">=E2=80=9CError! This allocator only handles alignments on=
 4 byte
boundaries.=E2=80=9D, __LINE__, __FUNCTION__ );</span></b></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>}</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>void * place =3D Fin=
dPlace( bytes, alignment
);</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>if ( place =3D=3D nu=
llptr )</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>{</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 </span>throw SmartBadAlloc( =E2=80=9CError! Unable
to allocate bytes.=E2=80=9D,</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>__LINE__, __FUNCTION__=
 );</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>}</span></p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13"><span zoompage=
-fontsize=3D"13">=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span>return place;</span>=
</p>

<p class=3D"MsoNormal" style=3D"margin-bottom:0in;margin-bottom:.0001pt;lin=
e-height:normal" zoompage-fontsize=3D"13"><span style=3D"font-size:10.0pt;f=
ont-family:&quot;Courier New&quot;" zoompage-fontsize=3D"13">}</span></p></=
div></blockquote><div zoompage-fontsize=3D"13"><br></div><div zoompage-font=
size=3D"13">Unless you write an English language parser to figure out what =
those mean, the only &quot;actionable&quot; thing that can be done is by th=
e <i zoompage-fontsize=3D"13">programmer</i> (aka: spitting the message out=
 to the log), not by the program itself.</div><div zoompage-fontsize=3D"13"=
><br></div><div zoompage-fontsize=3D"13">The only way to make this detectab=
le by the program itself is to have it throw something other than (or more =
than) `bad_alloc`. None of which requires playing games with its string.<br=
></div><div zoompage-fontsize=3D"13">=C2=A0<br></div><br></div>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/42389eb4-97a9-4a1d-bbfb-c653ba62097f%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/42389eb4-97a9-4a1d-bbfb-c653ba62097f=
%40isocpp.org</a>.<br />

------=_Part_3112_740863468.1504307057644--

------=_Part_3111_1365216330.1504307057642--

.
