Click here to Skip to main content
15,897,371 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 64K   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.

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

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