Page tree
Skip to end of metadata
Go to start of metadata

template<typename T >
FB::detail::VariantMapInserter< T > FB::variant_map_of ( const T &  t,
const FB::variant v 

Allows convenient creation of an FB::VariantMap.

A helper type that overloads operator() for insertion and is convertible to FB::VariantMap.


typedef std::map<std::string, FB::variant> StringVariantMap;
StringVariantMap varMap = FB::variant_map_of<std::string>("a",1)("b","2")("c",3.4);
FireEvent("randomDiceRoll", FB::variant_map_of<std::string>("foo",42));
std::string x = "xyz";
StringVariantMap varMap2 = FB::variant_map_of(x, 1);

Definition at line 134 of file variant_map.h.

135  {
136  return FB::detail::VariantMapInserter<T>(t, v);
137  }
  • No labels