Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Lack of pointer Typedef in STL container

Reply
Thread Tools

Lack of pointer Typedef in STL container

 
 
ManicQin
Guest
Posts: n/a
 
      04-10-2008
Looking at vector's header I can see that they provided me with a:
typedef A::reference reference;

But there's no typedef for a pointer to A...

Don't get me wrong I can easily write vector<someting>::value_type*
but it makes me wonder why supplying a typedef for reference
and not for pointer? Any special reasons you know of?
 
Reply With Quote
 
 
 
 
Barry
Guest
Posts: n/a
 
      04-10-2008
On Apr 10, 10:20*pm, ManicQin <(E-Mail Removed)> wrote:
> Looking at vector's header I can see that they provided me with a:
> typedef A::reference reference;
>
> But there's no typedef for a pointer to A...
>
> Don't get me wrong I can easily write vector<someting>::value_type*
> but it makes me wonder why supplying a typedef for reference
> and not for pointer? Any special reasons you know of?


C++03 has "pointer" typedef.

What's implementation you checked out?

Here I check out sgi, it has "pointer"
VC2005, it has
 
Reply With Quote
 
 
 
 
ManicQin
Guest
Posts: n/a
 
      04-10-2008
On Apr 10, 5:48*pm, Barry <(E-Mail Removed)> wrote:
> On Apr 10, 10:20*pm, ManicQin <(E-Mail Removed)> wrote:
>
> > Looking at vector's header I can see that they provided me with a:
> > typedef A::reference reference;

>
> > But there's no typedef for a pointer to A...

>
> > Don't get me wrong I can easily write vector<someting>::value_type*
> > but it makes me wonder why supplying a typedef for reference
> > and not for pointer? Any special reasons you know of?

>
> C++03 has "pointer" typedef.
>
> What's implementation you checked out?
>
> Here I check out sgi, it has "pointer"
> VC2005, it has


You're right, The first time I checked in VS6 but after your post I
checked my VS Express and found it.
Thanks.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Workaround for lack of templated typedef zr C++ 3 12-12-2008 06:06 PM
container inside container in stl wolverine C++ 2 07-24-2006 03:08 PM
Copy elements from one STL container to another STL container Marko.Cain.23@gmail.com C++ 4 02-16-2006 05:03 PM
STL: container's values setup by another container Maitre Bart C++ 2 02-11-2004 12:11 AM
std::container::iterator vs std::container::pointer Vivi Orunitia C++ 11 02-04-2004 08:09 AM



Advertisments