[any] Using any in static string table.
Hi there, is the following code possible?
#include <string>
#include
Ups, small error on my side. The code that compiles is like this:
#include <string>
#include
Hi there, is the following code possible?
#include <string>
#include
using namespace std; using namespace boost;
struct A {}; struct B {};
struct string_table { const any a; const string s; };
static string_table table[] = { { any( A ), "Hello" }, { any( B ), "Moin" } };
How would you implement such functionality?
Thanks ahead, Christian
participants (1)
-
Christian Henning