220 38912 <CALvx3hbmq1NUgE3njDeLLrmVX=GwAVfsUK-T7spZZFmgk_vmUg@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Richard Hodges <hodges.r@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Allow forward class declarations to match a type alias.
Date: Fri, 29 Jun 2018 18:42:53 +0200
Lines: 283
Approved: news@gmane.org
Message-ID: <CALvx3hbmq1NUgE3njDeLLrmVX=GwAVfsUK-T7spZZFmgk_vmUg@mail.gmail.com>
References: <b2fb570b-aadb-423e-9821-025cb447cf60@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="000000000000bd76c3056fca8a75"
X-Trace: blaine.gmane.org 1530290461 16498 195.159.176.226 (29 Jun 2018 16:41:01 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 29 Jun 2018 16:41:01 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBD4PBM7UWAHRBGWD3HMQKGQEUCOZD4A@isocpp.org Fri Jun 29 18:40:57 2018
Return-path: <std-proposals+bncBD4PBM7UWAHRBGWD3HMQKGQEUCOZD4A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-io0-f197.google.com ([209.85.223.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBD4PBM7UWAHRBGWD3HMQKGQEUCOZD4A@isocpp.org>)
	id 1fYwS8-0004AN-0h
	for gclcip-std-proposals@m.gmane.org; Fri, 29 Jun 2018 18:40:56 +0200
Original-Received: by mail-io0-f197.google.com with SMTP id t14-v6sf7313757ioj.8
        for <gclcip-std-proposals@m.gmane.org>; Fri, 29 Jun 2018 09:43:07 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1530290587; cv=pass;
        d=google.com; s=arc-20160816;
        b=fRozKNKpG2B942+bOXRBWKDoyIr6GeNe81jDQMIpmoiyUKdtdtYrbFbq+Uh/MVg3Bd
         5UMOw2XMSed9xOVVICMrVUHmgmBYUg5WzAiH2yzt+2mROEuqP0LPmp6uS3xCEpmo1itx
         kFa9oPDNxbArdFB6VAufJwgHpga56XcWpuPOu8UMC0hK8rn/icsJ2jTLxP6BW1vM+V4/
         24BwBViwGIkb0EGpU1teymnZKd0vCibazh9bSnkGws52rS05G8rGsTlTjmmll8LBxx8h
         TOSEhpdiq0hLCug002UlfvAPNRXR0JNKQJFxZ3ybs6WeCluE+akVdZ5jE5iJ54cmMGaa
         aNLg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:in-reply-to:references:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=gXPneQb5UStJUwzyrX68LMoSIOcUo/hAd8GeyIAdNaA=;
        b=fqaWCPFV510t0MLn/7ah0uaObQrrOAkIACDQSzCpTHbBBpB7JTWLMNAs6zhSzClOMX
         vqCRt88Cwe/EgFMRcyudgCBJAoBAfymjIobcp7vx6qz8RG0cbnH3LWlYo7MLbUcWbmXp
         5rSPs6sLUv6SBMi59mIeMHQMkoORo2BYN4rHiLbE9elWYSbMhwn5Wjf+DEt1if0cD+7u
         oexOZg+TyDQ84X5BC7BJG2VWElswHpJV/DCxMwdUNHqe5oMzLcncqtROOEICvuG4sg8T
         uXbQb+DZMFEgVYAec7ac7qjvB13UZQM90Aj+Y+z/g7Yh/u5GaTZRdatSZcfYK9n9zE4X
         SSkA==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=KPdb92Cn;
       spf=pass (google.com: domain of hodges.r@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=hodges.r@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:references:in-reply-to:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=gXPneQb5UStJUwzyrX68LMoSIOcUo/hAd8GeyIAdNaA=;
        b=ynN2+Ze0ZO7tOoeLAXndwIn+2etzyBYZJbZNHGbjKi+MOSSjR1FpCQQlXRwYmOH3Gf
         KABxpu3GzcdTDbtrkntTcobQmdEJj7zicUK55p3VrB9hxMe52JyH9TTmZU9i9lX2BJvh
         +cvDqQY4rGQZ6SdCoHtO2aMAY+7VUiAd9A0EU6OGgI3caZCsCtSYk3pn8YglX2Cf095K
         6rlJKSscXzi1BcCBE14jLj+AKKGNF9q3TtUBi2hatXFzsTSn4f8hWzX4BaJklaxK/vYf
         R3I2yx0ElC/J6YbO1fnfbCHBkLS1xlvE7JBgh+42QVzU6sk1IOjIyN0f8Y0tVo7QyiSL
         n87Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=gXPneQb5UStJUwzyrX68LMoSIOcUo/hAd8GeyIAdNaA=;
        b=fTG1Z8Cr41V/uPIROMstqZNE+BLhlI8OA8QSO2KM9KLbEsqgW799OuHVS16uDgCeBv
         1/Rh3W4FO4d7C84aSOsqsn3lwyIx7UGd2ycRqukhHLwODzf5j+GHP0khrdOBUtjT4939
         iZv/jG/arMgQiLaBgwSNv/0WoBFp11plIxAMWaXE9pzTHE5f7/1y5CjbNTvdbe6R73Gg
         5B1NaVdkKDdqLZWk3Sj93Qxn8PvxlC0nASqx8Yix3kCILhkOkxPO0usVVffvGAWq+MY9
         uKuly3yEvePP5NqhqgzAfAvIH7Pq/Zb+Njs3Osfsuc3X9g1nNINMqE/HJLzR7Bw+8+uO
         N+vw==
X-Gm-Message-State: APt69E2UA8vKRRT767JyoXELUb6YRYYo36zcLGzNR8hI9Mry0dAuVutW
	tFDZGcNc1pwSwHVvivbo0Vli+Q==
X-Google-Smtp-Source: AAOMgpcQZnfhJAadT1VT5pWxZdBMuVSmkwf9gExuGgVYldrUxc5rBJkBNSbHwNXipyi+vhoM7/5QOQ==
X-Received: by 2002:a24:4e06:: with SMTP id r6-v6mr1108571ita.9.1530290587112;
        Fri, 29 Jun 2018 09:43:07 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a24:3515:: with SMTP id k21-v6ls328080ita.5.gmail; Fri, 29
 Jun 2018 09:43:05 -0700 (PDT)
X-Received: by 2002:a24:c0c5:: with SMTP id u188-v6mr2343589itf.149.1530290585850;
        Fri, 29 Jun 2018 09:43:05 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1530290585; cv=none;
        d=google.com; s=arc-20160816;
        b=rWJQvm1dfdYYgflsfIbsGGFlB3Ig62xwcdcOHF7xAaLwDYIiURS66AEto3fn2DqID5
         sX97PGcbmuGJV2FGDIbPD0yK5sHDb8JWgRkkK2XQbTd6/+rR1T8jk8ypMeyEoSJkBmZI
         kTH2uBne+F59J7WznHKdn4M0GvZlCbob0Ij0SOQSo3oOADuhP0TUUn3Rvz18vshIf/kN
         D0iTboVpbPO3VETs5/5pOHLxwZAjNqQAfFuOatecyZLBTZbiBBH/zVy8ZAIFM+olE8Mi
         SEQHBNQ9eBLdw/JEYUhnyff7e1AaF+hq4mrdp8b5bEcYZ7QwhH2WPPBlWlNdYGaDH16M
         F5Cg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:in-reply-to:references:mime-version
         :dkim-signature:arc-authentication-results;
        bh=ofRgCK1J1SnBFluH+oaI5XZ8PvFlAdMwDvxJ5B0e2Tw=;
        b=DoRik4VctMtEyO2qoEMf0/6WkwIR+529Xu8bBDZWQFTwqSgvdp5sBr+7MjVRZx7AZV
         xrb9KZCaHM1tg+notRnJR0fbfK7r5HgzXLh7kbcjEG7bmK/RCBu7uvnDu0e66GH6hzwx
         BWNt8oyHr9yETUeYr5rbAsd27h2DSRQxXMiGksOJE/6o6HZFIVJiBhqpArCZ6Jn0fibi
         GVZRjsZKzLkI6de7C5QU/5Z7cuTMaSKNn8cMUT1VAjtI8/ZUVE8qhkrKH233ukOcv9z7
         ofa2ogQcQvbxazyGCYat/D38ZV8wFBY2cXhFttjtsOebwRVhYsrWzMK8H4l3KM6wtS4E
         jmmA==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=KPdb92Cn;
       spf=pass (google.com: domain of hodges.r@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=hodges.r@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id 189-v6sor3646753ioc.320.2018.06.29.09.43.05
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Fri, 29 Jun 2018 09:43:05 -0700 (PDT)
Received-SPF: pass (google.com: domain of hodges.r@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 2002:a6b:c781:: with SMTP id x123-v6mr13883178iof.100.1530290585301;
 Fri, 29 Jun 2018 09:43:05 -0700 (PDT)
In-Reply-To: <b2fb570b-aadb-423e-9821-025cb447cf60@isocpp.org>
X-Original-Sender: hodges.r@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=KPdb92Cn;       spf=pass
 (google.com: domain of hodges.r@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=hodges.r@gmail.com;       dmarc=pass (p=NONE
 sp=QUARANTINE dis=NONE) header.from=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:38912
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/38912>

--000000000000bd76c3056fca8a75
Content-Type: text/plain; charset="UTF-8"

I am wondering if your motivation is an XY problem, please see inline.

On Fri, 29 Jun 2018 at 09:56, Bengt Gustafsson <
bengt.gustafsson@beamways.com> wrote:

> A forward declaration of a class name is currently not allowed to be
> resolved by a type alias of a class template. I don't see the logic to
> this, why is this illegal:
>
> // forward declaration in one header file.
> class FloatImage;
>
>
> // Definition in another header file.
> template<typename T> class CudaImage {
> };
>
> using FloatImage = CudaImage<float>;
>
>
> Godbolt: https://godbolt.org/g/mmTTeQ shows that all compilers reject
> this.
>
> This has  created a fair amount of trouble for me when trying to refactor
> what was previously a FloatImage class to a generic pixel type template. I
> don't see the logic to making this
> illegal as FloatImage is still the name of a class, i.e. an instance of
> the CudaImage class template.
>

It seems to me that you previously forward-declared the class FloatImage,
which was later defined.

The might have looked like this:

class FloatImage;
// we can reference the type before definition
extern void foo(FloatImage& fi);


Later, before using a FloatImage, you would define the class.

The new code would need to look like this:

template<typename T> class CudaImage;
using FloatImage = CudaImage<float>;
// we can *still* reference the type before definition
extern void foo(FloatImage& fi);


Later, but before actually using a FloatImage, you would define the
template:

template<class T> class CudaImage
{
};



>
> While I can update the forward declaration to:
> // forward declaration in one header file.
> template<typename T> class CudaImage;
> using FloatImage = CudaImage<float>;
>
> This seems to be an unnecessary leakage of implementation detail.
>

I think the above solution resolves this leakage.


>
> so is there a technical reason preventing this from being allowed or is it
> just an oversight that could be corrected?
>

I don't think in reality that it's needed, or that the lack of the feature
is an oversight.


> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/b2fb570b-aadb-423e-9821-025cb447cf60%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/b2fb570b-aadb-423e-9821-025cb447cf60%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALvx3hbmq1NUgE3njDeLLrmVX%3DGwAVfsUK-T7spZZFmgk_vmUg%40mail.gmail.com.

--000000000000bd76c3056fca8a75
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I am wondering if your motivation is an XY problem, please=
 see inline.<br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri, 29 =
Jun 2018 at 09:56, Bengt Gustafsson &lt;<a href=3D"mailto:bengt.gustafsson@=
beamways.com">bengt.gustafsson@beamways.com</a>&gt; wrote:<br></div><blockq=
uote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc =
solid;padding-left:1ex"><div dir=3D"ltr">A forward declaration of a class n=
ame is currently not allowed to be resolved by a type alias of a class temp=
late. I don&#39;t see the logic to this, why is this illegal:<div><br></div=
><div><div><div><div class=3D"m_-6556502269256549060prettyprint" style=3D"b=
ackground-color:rgb(250,250,250);border-color:rgb(187,187,187);border-style=
:solid;border-width:1px;word-wrap:break-word"><code class=3D"m_-65565022692=
56549060prettyprint"><div class=3D"m_-6556502269256549060subprettyprint"><s=
pan style=3D"color:#800" class=3D"m_-6556502269256549060styled-by-prettify"=
>// forward declaration in one header file.</span><span style=3D"color:#000=
" class=3D"m_-6556502269256549060styled-by-prettify"><br></span><span style=
=3D"color:#008" class=3D"m_-6556502269256549060styled-by-prettify">class</s=
pan><span style=3D"color:#000" class=3D"m_-6556502269256549060styled-by-pre=
ttify"> </span><span style=3D"color:#606" class=3D"m_-6556502269256549060st=
yled-by-prettify">FloatImage</span><span style=3D"color:#660" class=3D"m_-6=
556502269256549060styled-by-prettify">;</span><span style=3D"color:#000" cl=
ass=3D"m_-6556502269256549060styled-by-prettify"><br><br><br></span><span s=
tyle=3D"color:#800" class=3D"m_-6556502269256549060styled-by-prettify">// D=
efinition in another header file.</span><span style=3D"color:#000" class=3D=
"m_-6556502269256549060styled-by-prettify"><br></span><span style=3D"color:=
#008" class=3D"m_-6556502269256549060styled-by-prettify">template</span><sp=
an style=3D"color:#660" class=3D"m_-6556502269256549060styled-by-prettify">=
&lt;</span><span style=3D"color:#008" class=3D"m_-6556502269256549060styled=
-by-prettify">typename</span><span style=3D"color:#000" class=3D"m_-6556502=
269256549060styled-by-prettify"> T</span><span style=3D"color:#660" class=
=3D"m_-6556502269256549060styled-by-prettify">&gt;</span><span style=3D"col=
or:#000" class=3D"m_-6556502269256549060styled-by-prettify"> </span><span s=
tyle=3D"color:#008" class=3D"m_-6556502269256549060styled-by-prettify">clas=
s</span><span style=3D"color:#000" class=3D"m_-6556502269256549060styled-by=
-prettify"> </span><span style=3D"color:#606" class=3D"m_-65565022692565490=
60styled-by-prettify">CudaImage</span><span style=3D"color:#000" class=3D"m=
_-6556502269256549060styled-by-prettify"> </span><span style=3D"color:#660"=
 class=3D"m_-6556502269256549060styled-by-prettify">{</span><span style=3D"=
color:#000" class=3D"m_-6556502269256549060styled-by-prettify"><br></span><=
span style=3D"color:#660" class=3D"m_-6556502269256549060styled-by-prettify=
">};</span><span style=3D"color:#000" class=3D"m_-6556502269256549060styled=
-by-prettify"><br><br></span><span style=3D"color:#008" class=3D"m_-6556502=
269256549060styled-by-prettify">using</span><span style=3D"color:#000" clas=
s=3D"m_-6556502269256549060styled-by-prettify"> </span><span style=3D"color=
:#606" class=3D"m_-6556502269256549060styled-by-prettify">FloatImage</span>=
<span style=3D"color:#000" class=3D"m_-6556502269256549060styled-by-prettif=
y"> </span><span style=3D"color:#660" class=3D"m_-6556502269256549060styled=
-by-prettify">=3D</span><span style=3D"color:#000" class=3D"m_-655650226925=
6549060styled-by-prettify"> </span><span style=3D"color:#606" class=3D"m_-6=
556502269256549060styled-by-prettify">CudaImage</span><span style=3D"color:=
#080" class=3D"m_-6556502269256549060styled-by-prettify">&lt;float&gt;</spa=
n><span style=3D"color:#660" class=3D"m_-6556502269256549060styled-by-prett=
ify">;</span><span style=3D"color:#000" class=3D"m_-6556502269256549060styl=
ed-by-prettify"><br></span></div></code></div><br><br>Godbolt:=C2=A0<a href=
=3D"https://godbolt.org/g/mmTTeQ" target=3D"_blank">https://godbolt.org/g/m=
mTTeQ</a> shows that all compilers reject this.</div><div><br></div><div>Th=
is has=C2=A0 created a fair amount of trouble for me when trying to refacto=
r what was previously a FloatImage class to a generic pixel type template. =
I don&#39;t see the logic to making this</div><div>illegal as FloatImage is=
 still the name of a class, i.e. an instance of the CudaImage class templat=
e.</div></div></div></div></blockquote><div><br></div><div>It seems to me t=
hat you previously forward-declared the class FloatImage, which was later d=
efined.</div><div><br></div><div>The might have looked like this:</div><div=
><br></div><div><font face=3D"monospace, monospace">class FloatImage;</font=
></div><div><div style=3D"color:rgb(0,0,0);background-color:rgb(255,255,254=
)"><div><span style=3D"color:rgb(0,128,0)"><font face=3D"monospace, monospa=
ce">// we can reference the type before definition</font></span></div><div>=
<font face=3D"monospace, monospace"><span style=3D"color:rgb(0,0,255)">exte=
rn</span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(=
0,0,255)">void</span><span style=3D"color:rgb(0,0,0)"> foo(FloatImage&amp; =
fi);</span></font></div><br></div><br></div><div>Later, before using a <fon=
t face=3D"monospace, monospace">FloatImage</font>, you would define the cla=
ss.</div><div><br></div><div>The new code would need to look like this:</di=
v><div><br></div><div><font face=3D"monospace, monospace">template&lt;typen=
ame T&gt; class CudaImage;</font></div><div><font face=3D"monospace, monosp=
ace">using FloatImage =3D CudaImage&lt;float&gt;;</font></div><div><div sty=
le=3D"color:rgb(0,0,0);text-decoration-style:initial;text-decoration-color:=
initial"><span style=3D"color:rgb(0,128,0)"><font face=3D"monospace, monosp=
ace">// we can *still* reference the type before definition</font></span></=
div><div style=3D"color:rgb(0,0,0);text-decoration-style:initial;text-decor=
ation-color:initial"><font face=3D"monospace, monospace"><span style=3D"col=
or:rgb(0,0,255)">extern</span><span style=3D"color:rgb(0,0,0)"><span>=C2=A0=
</span></span><span style=3D"color:rgb(0,0,255)">void</span><span style=3D"=
color:rgb(0,0,0)"><span>=C2=A0</span>foo(FloatImage&amp; fi);</span></font>=
</div><br class=3D"gmail-Apple-interchange-newline"><br></div><div>Later, b=
ut before actually using a <font face=3D"monospace, monospace">FloatImage</=
font>, you would define the template:</div><div><br></div><div><div style=
=3D"color:rgb(0,0,0);background-color:rgb(255,255,254)"><div><font face=3D"=
monospace, monospace"><span style=3D"color:rgb(0,0,255)">template</span><sp=
an style=3D"color:rgb(0,0,0)">&lt;</span><span style=3D"color:rgb(0,0,255)"=
>class</span><span style=3D"color:rgb(0,0,0)"> T&gt; </span><span style=3D"=
color:rgb(0,0,255)">class</span><span style=3D"color:rgb(0,0,0)"> CudaImage=
</span></font></div><div><span style=3D"color:rgb(0,0,0)"><font face=3D"mon=
ospace, monospace">{</font></span></div><div><span style=3D"color:rgb(0,0,0=
)"><font face=3D"monospace, monospace">    </font></span></div><div><span s=
tyle=3D"color:rgb(0,0,0)"><font face=3D"monospace, monospace">};</font></sp=
an></div></div></div><div><br></div><div>=C2=A0</div><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l=
eft:1ex"><div dir=3D"ltr"><div><div><div><br></div><div>While I can update =
the forward declaration to:</div><div class=3D"m_-6556502269256549060pretty=
print" style=3D"background-color:rgb(250,250,250);border-color:rgb(187,187,=
187);border-style:solid;border-width:1px;word-wrap:break-word"><code class=
=3D"m_-6556502269256549060prettyprint"><div class=3D"m_-6556502269256549060=
subprettyprint"><span style=3D"color:#800" class=3D"m_-6556502269256549060s=
tyled-by-prettify">// forward declaration in one header file.</span><span s=
tyle=3D"color:#000" class=3D"m_-6556502269256549060styled-by-prettify"><br>=
</span><span style=3D"color:#008" class=3D"m_-6556502269256549060styled-by-=
prettify">template</span><span style=3D"color:#660" class=3D"m_-65565022692=
56549060styled-by-prettify">&lt;</span><span style=3D"color:#008" class=3D"=
m_-6556502269256549060styled-by-prettify">typename</span><span style=3D"col=
or:#000" class=3D"m_-6556502269256549060styled-by-prettify"> T</span><span =
style=3D"color:#660" class=3D"m_-6556502269256549060styled-by-prettify">&gt=
;</span><span style=3D"color:#000" class=3D"m_-6556502269256549060styled-by=
-prettify"> </span><span style=3D"color:#008" class=3D"m_-65565022692565490=
60styled-by-prettify">class</span><span style=3D"color:#000" class=3D"m_-65=
56502269256549060styled-by-prettify"> </span><span style=3D"color:#606" cla=
ss=3D"m_-6556502269256549060styled-by-prettify">CudaImage</span><span style=
=3D"color:#660" class=3D"m_-6556502269256549060styled-by-prettify">;</span>=
<span style=3D"color:#000" class=3D"m_-6556502269256549060styled-by-prettif=
y"><br></span><span style=3D"color:#008" class=3D"m_-6556502269256549060sty=
led-by-prettify">using</span><span style=3D"color:#000" class=3D"m_-6556502=
269256549060styled-by-prettify"> </span><span style=3D"color:#606" class=3D=
"m_-6556502269256549060styled-by-prettify">FloatImage</span><span style=3D"=
color:#000" class=3D"m_-6556502269256549060styled-by-prettify"> </span><spa=
n style=3D"color:#660" class=3D"m_-6556502269256549060styled-by-prettify">=
=3D</span><span style=3D"color:#000" class=3D"m_-6556502269256549060styled-=
by-prettify"> </span><span style=3D"color:#606" class=3D"m_-655650226925654=
9060styled-by-prettify">CudaImage</span><span style=3D"color:#080" class=3D=
"m_-6556502269256549060styled-by-prettify">&lt;float&gt;</span><span style=
=3D"color:#660" class=3D"m_-6556502269256549060styled-by-prettify">;</span>=
<span style=3D"color:#000" class=3D"m_-6556502269256549060styled-by-prettif=
y"><br></span></div></code></div><div><div><br>This seems to be an unnecess=
ary leakage of implementation detail.</div></div></div></div></div></blockq=
uote><div><br></div><div>I think the above solution resolves this leakage.<=
/div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0=
 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>=
<div><div><div><br></div><div>so is there a technical reason preventing thi=
s from being allowed or is it just an oversight that could be corrected?</d=
iv></div></div></div></div></blockquote><div><br></div><div>I don&#39;t thi=
nk in reality that it&#39;s needed, or that the lack of the feature is an o=
versight.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"=
margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"=
ltr"><div><div><div><div></div></div></div></div></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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/b2fb570b-aadb-423e-9821-025cb447cf60%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/b2fb570b-aadb-=
423e-9821-025cb447cf60%40isocpp.org</a>.<br>
</blockquote></div></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/CALvx3hbmq1NUgE3njDeLLrmVX%3DGwAVfsUK=
-T7spZZFmgk_vmUg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALvx3hbmq1NUgE=
3njDeLLrmVX%3DGwAVfsUK-T7spZZFmgk_vmUg%40mail.gmail.com</a>.<br />

--000000000000bd76c3056fca8a75--

.
