Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/Common/Data/Collections/ConstMap.h
3189 views
1
#pragma once
2
3
#include <map>
4
5
template <typename T, typename U>
6
class InitConstMap
7
{
8
private:
9
std::map<T, U> m_map;
10
public:
11
InitConstMap(const T& key, const U& val)
12
{
13
m_map[key] = val;
14
}
15
16
InitConstMap<T, U>& operator()(const T& key, const U& val)
17
{
18
m_map[key] = val;
19
return *this;
20
}
21
22
operator std::map<T, U>()
23
{
24
return m_map;
25
}
26
};
27
28