
30 Sep
2009
30 Sep
'09
9:18 p.m.
1) boost::variant and "Current Approach: Temporary Heap Backup" vs "An Initial Solution: Double Storage" Please provide both solutions. A potential heap allocation may prevent certain application areas. 2) I also do not understand that exception safety requires that the variant is never empty (e.g. empty() returning always false). What is the use of calling the constructor (of which type btw?) if somebody creates an unintialized variant variable? Or: In the following piece of code is the std::string constructor being called? boost::variant<std::string, int> s; Thanks Peter