Click here to Skip to main content
15,885,244 members
Articles / Programming Languages / C++

A Type-safe Generic Pointer

Rate me:
Please Sign up or sign in to vote.
4.82/5 (18 votes)
2 Mar 2011MIT4 min read 63.3K   397   37  
A safer alternative to void*, any_ptr can point to any type of object and provide type-safe, const-correct access to it.

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

No alternatives have been posted.

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Software Developer
United States United States
Besides loving spending time with family, Francis Xavier likes to watch sci-fi/fantasy/action/drama movies, listen to music, and play video-games. After being exposed to a few video-games, he developed an interest in computer programming. He currently holds a Bachelor's degree in Computer Applications.

Comments and Discussions