I am trying to pass an object that contains a boost::any data member through a networking API to exchange data between two applications. I know that t ...
I am trying to pass an object that contains a boost::any data member through a networking API to exchange data between two applications. I know that t ...
I can use a loop to copy elements from boost::any vector to std::vector of floats. It is inefficient in the sense that there are 50000 values to copy ...
I wrote a generic class to provide an easy JSON-based init to any class. It was working like a charm until I want to apply it to a class that contain ...
I have a boost::any object, and I would like to check its type. This is easy enough when the type is defined, however how would I achieve a the sam ...
So What I'm trying to do is something like this. I have a template struct like this one: And I want to make a vector with different types of that ...
I have the following test application: I compile and run like so: Output is: I would expect for all 3 tests the same output. But it's not. W ...
There are several parts to my question. I have been researching on how/when to use boost::any. I was wondering if it is possible to assign a struct to ...
I've got a piece of code in which I use boost::unsafe_any_cast<void*>(&boost::any anyInstance) to obtain the content pointer of a boost::any ...
boost::any: I tried to compile and run the following code to test this: But it gets a segfault in the boost::any destructor. boost::variant: Try ...
In C, one can assign a data pointer to a void pointer and then cast it back to the original type, that data pointer will be recovered. The language st ...
I have written the following function: Basically, I want to be able to call things like: However, I get the following error: I cannot figure ...
I am writing helper functions which converts DBus properties values to std types. For that, to convert few type, i need to create a std::map. The map ...
I have different data types which I'm trying to save in one HashMap. The HashMap will be created inside a variable arguments function. Unions under ...
for a particular requirement I want to have a map with keys in different type. Similar to boost:any. (I have an old gcc version) is this something ...
In my projects I'm using boost::any and boost::variant exhaustively. For this a general conversion routine from boost::any to boost::variant was devis ...
Boost's <boost/any.hpp> has: (among other variants.) Shouldn't this combination cause ambiguity in calls such as boost::any_cast<int>(m ...
I'd like to store vectors of any type in another vector. So, for example I have two vector instances, "std::vector v1" and "std::vector v2". And I wou ...
When I declare a variable of std::unordered_map<boost::any, boost::any> type, it throws annoying compile errors. For an example, any.cc: Com ...
On the Boost web site I found no information regarding the use or RTTI by boost::any. I read in a few places that this is a requirement, but then I b ...
It took me a while to figure this out, but the semantics of boost::any are confusing. With value types, you use it like so: This code is clear and ...