boost-any
Is there a way get an integer out of boost::any if you don't know if original type was signed or unsigned
I\'m using boost::any in combination with boost::any_cast<> to write some framework code which should take a set of arguments, almost like a function call, and convert them into an array of boos[详细]
2023-04-11 20:08 分类:问答Building boost::options from a string/boost::any map
I have a map which represents a configuration.It\'s a map of std::string and boost::any. This map is initialized at the 开发者_如何学运维start and I\'d like the user to be able to override these opti[详细]
2023-03-08 10:23 分类:问答Why doesn't boost::any have a "getter"?
Using boost::any is very useful but it\'s very depressing that it has no getter, and always we have to use any_cast for casting it to type we want. Bu开发者_开发知识库t why it has no such thing? In my[详细]
2023-03-02 05:05 分类:问答Better handling of missing/wrong key in boost::program_options
Is there a way to know which key was involved when a call like the following fails ? boost::program_options::variables_map vm;[详细]
2023-02-24 02:20 分类:问答Accessing Values in a Class Similar to boost::any
I\'m making a simple boost::any-like class for educational purposes, but I can\'t figure out how to access the stored value.I can set the value perfectly, but when I try to access any member in the \"[详细]
2023-02-11 02:48 分类:问答c++ boost::any to define my own print ,
Am struggling a lot to find how to do to use boos开发者_高级运维t::any to create a print function that can print any type using template first.[详细]
2023-02-10 01:12 分类:问答Polymorphic operator on a list of boost::any?
Suppose I have a list of type list<boost::any> that has some type in it that is unknown. Now suppose I want to apply some operation to the elements in the list that is polymorphic. In this case,[详细]
2023-01-25 08:30 分类:问答How to print boost::any to a stream?
I have a Mapstd::map<std::string, boost::any>, which comes from the boost::program_options package. Now I would like to print the content of that map:[详细]
2023-01-06 22:58 分类:问答Casting from any
I\'m packing some classes into ptr_map with any typed value. class EventManager { ptr_map<string, any> mSomeMap;[详细]
2023-01-03 20:40 分类:问答Storing objects in the array
I want to save boost signals objects in the map (association: signal name → signal object). The signals signature is different, so the second type of map should be boost::any.[详细]
2023-01-03 13:29 分类:问答