Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <boost/variant.hpp>
- class b_fwd;
- typedef
- boost::variant
- <
- boost::recursive_wrapper<b_fwd>
- >
- a
- ;
- class c_fwd;
- typedef
- boost::variant
- <
- boost::recursive_wrapper<c_fwd>
- >
- b
- ;
- struct b_fwd: b
- {
- //inherit constructors
- template<typename... Ts>
- b_fwd(Ts... o): b(o...){}
- };
- typedef
- boost::variant
- <
- double,
- char*
- >
- c
- ;
- struct c_fwd: c
- {
- //inherit constructors
- template<typename... Ts>
- c_fwd(Ts... o): c(o...){}
- };
- void
- f(const b& b_node)
- {
- a a_node(b_node);
- }
- int main()
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement