我希望有一种行为类似于boost::any
但类型集更有限的类型。像这样的东西:
limited_any<int,long,string> x; // x is like boost::any but is guaranteed to contain only an int, a long, or a string
你会如何建议实施这个?(我自己或使用现有的解决方案)
我希望有一种行为类似于boost::any
但类型集更有限的类型。像这样的东西:
limited_any<int,long,string> x; // x is like boost::any but is guaranteed to contain only an int, a long, or a string
你会如何建议实施这个?(我自己或使用现有的解决方案)