VC6 cannot handle template class typedef of a template class with the same name (in a different namespace)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7047 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
3c6821f214
commit
5b09b32668
9 changed files with 10 additions and 22 deletions
|
@ -170,14 +170,13 @@ namespace MakensisAPI {
|
|||
#define FLAG_OFFSET(flag) (FIELD_OFFSET(exec_flags_t, flag)/sizeof(int))
|
||||
|
||||
class DiagState {
|
||||
template<class M> struct mapped_type_helper { typedef typename STLHelpers::mapped_type_helper<M>::type type; };
|
||||
template<class C, class K, class V> void insert_or_assign(C&c, const K&k, V val)
|
||||
{
|
||||
typename C::value_type item(k, val);
|
||||
std::pair<NSIS_CXX_TYPENAME C::iterator, bool> ret = c.insert(item);
|
||||
if (!ret.second) ret.first->second = val;
|
||||
}
|
||||
template<class C, class K> typename mapped_type_helper<C>::type get_paired_value(const C&c, const K&k, typename mapped_type_helper<C>::type defval) const
|
||||
template<class C, class K> typename STL::mapped_type<C>::type get_paired_value(const C&c, const K&k, typename STL::mapped_type<C>::type defval) const
|
||||
{
|
||||
typename C::const_iterator it = c.find(k);
|
||||
return c.end() == it ? defval : it->second;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue