これは当然のことのように感じますが、今日はひっそりしていると思います。
コンパイラに静的な型を与えるにはどうすればよいですか?
元:
auto it = m_security_look_aside.find(strPath);
if (it == m_security_look_aside.end())
it = m_security_look_aside.insert(it, TYPE_OF(m_security_look_aside)::value_type(strPath, InternalIsLicensed(strPath)));
m_security_look_aside
ですstd::unordered_map<std::string, bool>
。
typedefstd::unordered_map<std::string, bool>
があります。value_type
std::unordered_map<std::string, bool>::value_type(key,value)
この順序付けられていないマップに属するペアを作成するために使用できます。しかし、どうすればインスタンスからその静的型に移行できますか?