220 38930 <49cde8d1-312f-4c4c-a26e-91bbb1c56a2d@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: mihailnajdenov@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Allow forward class declarations to match a type alias.
Date: Sat, 30 Jun 2018 00:52:30 -0700 (PDT)
Lines: 84
Approved: news@gmane.org
Message-ID: <49cde8d1-312f-4c4c-a26e-91bbb1c56a2d@isocpp.org>
References: <b2fb570b-aadb-423e-9821-025cb447cf60@isocpp.org>
 <CAC+0CCMRC5JHx4N2JFzN960xfYsBVfKVt=7iSN5NCws3ALHkFA@mail.gmail.com>
 <a4d20e97-3563-43c3-a1f9-a7b2e57276b4@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_2807_1386991573.1530345151067"
X-Trace: blaine.gmane.org 1530345027 30217 195.159.176.226 (30 Jun 2018 07:50:27 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 30 Jun 2018 07:50:27 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCUJ3A7GRAPRBP7N3TMQKGQEEQG3PDY@isocpp.org Sat Jun 30 09:50:23 2018
Return-path: <std-proposals+bncBCUJ3A7GRAPRBP7N3TMQKGQEEQG3PDY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f197.google.com ([209.85.161.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCUJ3A7GRAPRBP7N3TMQKGQEEQG3PDY@isocpp.org>)
	id 1fZAeD-0007lh-HO
	for gclcip-std-proposals@m.gmane.org; Sat, 30 Jun 2018 09:50:21 +0200
Original-Received: by mail-yw0-f197.google.com with SMTP id i11-v6sf11173233ywc.17
        for <gclcip-std-proposals@m.gmane.org>; Sat, 30 Jun 2018 00:52:33 -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=bFbR3dRv+1OnEbVtOPVyleTOW0Fo1X/3p5Ol9rlOAfU=;
        b=emt3YYXq/TjFsJ/NeQP6FpaLDcMFU5+83SltDPrtcoRqVtHnMKZkofR4NmYTahXDmy
         Vg/zOBewHZ8WgmbivbIDfdRA8fE9pNdBH8+7pY3IDjvzVDWzVn+Cg0x0fPeOPfbsiRES
         m255PXRRaOu321CS8DwM32b0KJBRKWkc0+e0AwZbSzcQczmK3DqAq4XoDKVw+fC8mgAD
         SHtveANXkX9ULcIG3AksOBmecgH9u5lej6MEH00Fio4kF2g/i5d/r+Z8j+6+tjLgvj+p
         /8O14AKELB96+dCvL7x0+k3goK9WgbXiueRfmvnEpEXwigBjAFjNLYRHKooZz51yAixo
         Wj3w==
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=bFbR3dRv+1OnEbVtOPVyleTOW0Fo1X/3p5Ol9rlOAfU=;
        b=cfMo0QyGfT9wkoQPrbc91Wd1P44K6L/trQLISxD1iKzLe2bI9Opp1zSbxDICqFxvBG
         AS08XVT5B9fEOFg36iyVqDD8MPk07W18hKfCM6lt4vyLOpexK3uEL4ugdiYraL0ZLf0F
         ISOXrkgR6gXq7hh1pY//pQ9rZ1hTFjwO9JrcdCyIZzOfSeOLsvBm4/m3V7bW9bXqXl62
         IgEnJ02sB6KsiTmj8OOY9Lb6ay3xmjaShy7/DvHlvSbtfxX9sRgquMLEYAjMGqIrwfeU
         HF7rOxzKXEM0LVDsLJPdaxcvnR6fymuUipjfInNqiUvUUiYRBPZkChp25Q7vAihujZ5k
         8Sqg==
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=bFbR3dRv+1OnEbVtOPVyleTOW0Fo1X/3p5Ol9rlOAfU=;
        b=cL4sdmBBc6HUYIyP6q/iH6bbqYmfy86ZoCr2o5lnHNxTZ66BlkQ0lRM1BrULY9SxSF
         m19OzMH3WixE4RVIXLz/u1mgSPh68poA8OuvBR4n8wX7yeIlaMRmFZ4BAe+vw23imaeD
         SrpbuuLMGvf0jOgMhI9+SU86AOpT65DmEAExwCKPBtxqAh+aqazgYLPijlZ9V352/ngp
         /rtCyNpjvJzrk5cao44hGMvl7j+xVTkwXXVnqVznIIIG9boMMJDKqHkHOv09fg4oT1SW
         y7jLMbDYEjxWncy0oE4K4SbiftjSEmD3683AUIYLQr+TG2ePF7hh6VWYfhxPzEITWx/G
         8gqA==
X-Gm-Message-State: APt69E21k+xn2Cr+9CsOhHlobILhfrs7TW6WlulUWO6yLUAgjz4lSJAr
	WiFsJkr1VeLIIHtnPAIUALPoMg==
X-Google-Smtp-Source: AAOMgpcDy9hj/O53odFw//y7hkRzglQtvWZO+iiU9A8e1rrWnw0alfoIRpcLsUJTann6DfbOu+k61g==
X-Received: by 2002:a81:360e:: with SMTP id d14-v6mr4203015ywa.99.1530345152617;
        Sat, 30 Jun 2018 00:52:32 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a25:4181:: with SMTP id o123-v6ls3552471yba.21.gmail; Sat,
 30 Jun 2018 00:52:31 -0700 (PDT)
X-Received: by 2002:a25:8486:: with SMTP id v6-v6mr1747233ybk.3.1530345151565;
        Sat, 30 Jun 2018 00:52:31 -0700 (PDT)
In-Reply-To: <a4d20e97-3563-43c3-a1f9-a7b2e57276b4@isocpp.org>
X-Original-Sender: MihailNajdenov@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: <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:38930
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/38930>

------=_Part_2807_1386991573.1530345151067
Content-Type: multipart/alternative; 
	boundary="----=_Part_2808_1546498443.1530345151067"

------=_Part_2808_1546498443.1530345151067
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable



On Saturday, June 30, 2018 at 9:49:52 AM UTC+3, Bengt Gustafsson wrote:
>
> I got one good answer: it is not possible due to name mangling having to=
=20
> know that FloatImage will resolve to a template instance. I used the=20
> proposed solution but it unfortunately had me change the forward=20
> declarations of FloatImage.=20


 What solution did you use?=20
Did you try the concrete class solution - it is not as na=C3=AFve as it sou=
nds,=20
not as hard as it sounds (in C++11+) and has many protentional side=20
benefits.

Otherwise the classical solution is not to forward declare a class but to=
=20
have xxxfrw.h header instead, where you can put all "leakage of=20
implementation detail".=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/49cde8d1-312f-4c4c-a26e-91bbb1c56a2d%40isocpp.or=
g.

------=_Part_2808_1546498443.1530345151067
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Saturday, June 30, 2018 at 9:49:52 AM UTC+3, Be=
ngt Gustafsson wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;m=
argin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">I got one=
 good answer: it is not possible due to name mangling having to know that F=
loatImage will resolve to a template instance. I used the proposed solution=
 but it unfortunately had me change the forward declarations of FloatImage.=
 </blockquote><div><br></div><div>=C2=A0What solution did you use?=C2=A0</d=
iv><div>Did you try the concrete class solution - it is not as na=C3=AFve a=
s it sounds, not as hard as it sounds (in C++11+) and has many protentional=
 side benefits.<br></div><div><br></div><div>Otherwise the classical soluti=
on is not to forward declare a class but to have xxxfrw.h header instead, w=
here you can put all &quot;<span style=3D"display: inline !important; float=
: none; background-color: transparent; color: rgb(34, 34, 34); font-family:=
 &quot;Arial&quot;,&quot;Helvetica&quot;,sans-serif; font-size: 13px; font-=
style: normal; font-variant: normal; font-weight: 400; letter-spacing: norm=
al; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; =
text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; =
word-spacing: 0px;">leakage of implementation detail</span>&quot;.=C2=A0</d=
iv></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/49cde8d1-312f-4c4c-a26e-91bbb1c56a2d%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/49cde8d1-312f-4c4c-a26e-91bbb1c56a2d=
%40isocpp.org</a>.<br />

------=_Part_2808_1546498443.1530345151067--

------=_Part_2807_1386991573.1530345151067--

.
