ppsspp/ext/native/util/const_map.h
2015-09-06 12:24:17 -07:00

25 lines
387 B
C++

#pragma once
template <typename T, typename U>
class InitConstMap
{
private:
std::map<T, U> m_map;
public:
InitConstMap(const T& key, const U& val)
{
m_map[key] = val;
}
InitConstMap<T, U>& operator()(const T& key, const U& val)
{
m_map[key] = val;
return *this;
}
operator std::map<T, U>()
{
return m_map;
}
};