Topic: Any library proposal (Revision 2) draft
Author: Sylvester Hesp <s.hesp@oisyn.nl>
Date: Thu, 17 Jan 2013 12:55:49 -0800
Raw View
available
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Oh but I'm not arguing against being able to get the type_info of the
stored type - I very much like to see that.
- Sylvester
From: Paul Smith
Sent: 17-1-2013 18:15
To: std-proposals@isocpp.org
Subject: Re: [std-proposals] Any library proposal (Revision 2) draft
available
On Thu, Jan 17, 2013 at 6:23 PM, Sylvester Hesp <s.hesp@oisyn.nl> wrote:
> On Thursday, January 17, 2013 3:23:27 PM UTC+1, Tony V E wrote:
>>
>> I don't think it is always that you put a derived type in, but in
>> general, you may not know the type put in.
>
>
> You *always* know the type you put in.
You always know the stored type... at the point of store.
There could be all sorts of reasons to want to query the type of the
value instead of just testing for a specific type. Dynamic-dispatching
is probably the most prominent example, even though it's arguable that
'any' isn't necessarily the best tool for the job.
At any rate, I don't see a simple way to implement 'a.is_type<T>()'
other than 'a.type() == typeid(T)' (which really isn't *that* much
worse).
--
Paul Smith
--
--
.
Author: Sylvester Hesp <s.hesp@oisyn.nl>
Date: Thu, 17 Jan 2013 14:25:30 -0800 (PST)
Raw View
------=_Part_875_17269014.1358461530775
Content-Type: text/plain; charset=ISO-8859-1
I'm sorry my phone screwed up, please disregard this thread.
- Sylvester
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To post to this group, send email to std-proposals@isocpp.org.
To unsubscribe from this group, send email to std-proposals+unsubscribe@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.
------=_Part_875_17269014.1358461530775
Content-Type: text/html; charset=ISO-8859-1
I'm sorry my phone screwed up, please disregard this thread.<div><br></div><div>- Sylvester</div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
To unsubscribe from this group, send email to std-proposals+unsubscribe@isocpp.org.<br />
Visit this group at <a href="http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en">http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en</a>.<br />
<br />
<br />
------=_Part_875_17269014.1358461530775--
.