From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115844 invoked by alias); 2 May 2015 17:51:08 -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 115824 invoked by uid 89); 2 May 2015 17:51:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-la0-f49.google.com Received: from mail-la0-f49.google.com (HELO mail-la0-f49.google.com) (209.85.215.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 02 May 2015 17:51:06 +0000 Received: by labbd9 with SMTP id bd9so81407464lab.2; Sat, 02 May 2015 10:51:03 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.112.160.41 with SMTP id xh9mr12663838lbb.96.1430589063546; Sat, 02 May 2015 10:51:03 -0700 (PDT) Received: by 10.25.42.203 with HTTP; Sat, 2 May 2015 10:51:03 -0700 (PDT) In-Reply-To: <20150502173303.GD3618@redhat.com> References: <20150502123920.GW3618@redhat.com> <20150502130359.GY3618@redhat.com> <20150502173303.GD3618@redhat.com> Date: Sat, 02 May 2015 17:51:00 -0000 Message-ID: Subject: Re: [patch] Fix std::experimental::any for small, non-trivial objects From: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= To: Jonathan Wakely Cc: "libstdc++" , gcc-patches List Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2015-05/txt/msg00148.txt.bz2 2015-05-02 19:33 GMT+02:00 Jonathan Wakely : > Looking at it now, I think the _Internal alias template should also > check that alignof(_Tp) <= alignof(void*) so that it can safely be > stored in the _Storage. > > Otherwise a type with sizeof(T) <= sizeof(void*) but > alignof(T) > alignof(void*) would not be correctly aligned when stored > in the buffer. Yes, I agree. - Daniel