You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Value class can store any type of variable, and supports conversion
to any type compatible with the stored type.
\code
camp::Value v1 = true;
camp::Value v2 = 10;
camp::Value v3 = "24.5";
camp::Value v4 = myObject;
bool b = v1; // b == true
std::string s = v2; // s == "10"
float f = v3; // f == 24.5
MyObject o = v4; // o == myObject
Based on this, you might think that the assignment would do the type conversion when assigning a number string to a number directly. It does not compile. This is no big deal because class ponder::Value overloads operator T() and it does the conversion correctly for other cases, such as passing a Value to a function argument of a string or a number type.
From the document, it looks like I should be able to assign a ponder::Value to a std::string but I get the following compiler error.
Is this expected?
The text was updated successfully, but these errors were encountered: