Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
heterogenous container class
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Ulrich Eckhardt, post: 4176971"] The only thing I haven't found yet is how to check the type of I'd say you really didn't. Anyhow, there are three ways to check the type: 1. As mentioned, use which(). 2. Use boost::get<T>. If T is a reference type or a pointer type, you will get feedback whether it fits similarly to dynamic_cast. 3. Use a visitor. The visitor pattern allows you to supply a functor and the according function there is called. Maybe. ;) You should be able to find all docs online at Boost's, including details to the above three variants. Uli [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
heterogenous container class
Top