SU2
Public Member Functions | List of all members
CCreateMap< T, U > Class Template Reference

creates a map from a list by overloading operator() More...

#include <option_structure.hpp>

Public Member Functions

 CCreateMap (const T &key, const U &val)
 
CCreateMap< T, U > & operator() (const T &key, const U &val)
 
 operator std::map< T, U > ()
 

Detailed Description

template<typename T, typename U>
class CCreateMap< T, U >

creates a map from a list by overloading operator()

Template Parameters
T- the key type in the map
U- the mapped value type in the map
Author
Boost.Assign and anonymous person on stackoverflow

We need this to create static const maps that map strings to enum types. The implementation is based on the Boost.Assign library. This particular version is taken from http://stackoverflow.com/questions/138600/initializing-a-static-stdmapint-int-in-c


The documentation for this class was generated from the following file: