This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [GSoC] __enable_shared_from_this_helper
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Fan You <youfan dot noey at gmail dot com>
- Cc: Tim Shen <timshen at google dot com>, Tim Shen <timshen91 at gmail dot com>, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 4 May 2015 00:33:13 +0100
- Subject: Re: [GSoC] __enable_shared_from_this_helper
- Authentication-results: sourceware.org; auth=none
- References: <CAG4ZjNnFTOtEoSPdzv9Dip8s7O6o4ToL2+N-j_oEuxvrD1spLA at mail dot gmail dot com> <20150430112352 dot GR3618 at redhat dot com> <CAG4ZjNmgtF-7jE17d=e8fK_iMhkDHT783Qv1sYpt6MPKsmLL=A at mail dot gmail dot com> <20150430174827 dot GU3618 at redhat dot com> <CALvpekGSvSvg=WcF4w2r3LQ377azPfsAKfLtA5pFm3OKz6DesA at mail dot gmail dot com> <CAG4ZjNmAeB_CvR_4HXO7y3=FxcsTfAXi95RxeH=c8ngfTic5vA at mail dot gmail dot com> <CALvpekF+Y1C+EgevdyEzgt++OEUz4iyjCdTnA6Ny5Ak=b88HTg at mail dot gmail dot com> <CAG4ZjNktcN84WzhTMx-N7SDCG6DYdcH-P6FwnExd-gjp-RH3RQ at mail dot gmail dot com> <CALvpekEmg5f38iXpkNuaXmU0TNJboJSUAEEMo9Qpe4GrFhaTUw at mail dot gmail dot com> <20150503232806 dot GC2399 at redhat dot com>
[Sory for any duplicate mails, I'm having connection problems)
On 04/05/15 00:28 +0100, Jonathan Wakely wrote:
On 03/05/15 19:03 -0400, Fan You wrote:
2.
int* a = new int(1);
shared_ptr<int> a1(a);
shared_ptr<int> a2(a);
This is undefined behaviour.
It's possible not everyone agrees:
http://cplusplus.github.io/LWG/lwg-active.html#2179
(but if they don't they're wrong ;-)