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
|
@ -1097,9 +1097,9 @@ FORCEINLINE BOOL NoDepr_GetVersionExW(OSVERSIONINFOW*p) { __pragma(warning(push)
|
|||
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace STLHelpers
|
||||
namespace STL
|
||||
{
|
||||
template<class M> struct mapped_type_helper { typedef typename M::value_type::second_type type; }; // VC6 uses referent_type and not mapped_type
|
||||
template<class M> struct mapped_type { typedef typename M::value_type::second_type type; }; // VC6 uses referent_type and not mapped_type
|
||||
}
|
||||
#endif //~ __cplusplus
|
||||
|
||||
|
|
|
@ -266,7 +266,7 @@ bool Plugins::IsPluginCallSyntax(const tstring& token)
|
|||
struct PrintPluginDirsHelper {
|
||||
template<class C> static void print(const C&c, const char*indent = "")
|
||||
{
|
||||
std::/*unordered_*/set<typename STLHelpers::mapped_type_helper<C>::type
|
||||
std::/*unordered_*/set<NSIS_CXX_TYPENAME STL::mapped_type<C>::type
|
||||
#ifdef _WIN32
|
||||
, Plugins::strnocasecmp
|
||||
#endif
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <set>
|
||||
#include "tstring.h"
|
||||
|
||||
namespace STLHelpers
|
||||
namespace STL
|
||||
{
|
||||
template<class S, class C>
|
||||
struct string_nocasecmpless : std::binary_function<S, S, bool>
|
||||
|
@ -44,7 +44,7 @@ namespace STLHelpers
|
|||
class Plugins
|
||||
{
|
||||
public:
|
||||
typedef STLHelpers::string_nocasecmpless<tstring, tstring::value_type> strnocasecmp;
|
||||
typedef STL::string_nocasecmpless<tstring, tstring::value_type> strnocasecmp;
|
||||
|
||||
Plugins() : m_initialized(false) {}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -2291,18 +2291,14 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
{
|
||||
manifest_sosl.deleteall();
|
||||
if (2 == line.getnumtokens())
|
||||
{
|
||||
switch(line.gettoken_enum(1,_T("none\0all\0")))
|
||||
{
|
||||
case 0: return PS_OK;
|
||||
case 1: return manifest_sosl.addall() ? PS_OK : PS_ERROR;
|
||||
}
|
||||
}
|
||||
for(int argi = 1; argi < line.getnumtokens(); ++argi)
|
||||
{
|
||||
if (!manifest_sosl.append(line.gettoken_str(argi)))
|
||||
PRINTHELP();
|
||||
}
|
||||
}
|
||||
return PS_OK;
|
||||
case TOK_MANIFEST_DISABLEWINDOWFILTERING:
|
||||
|
|
|
@ -1010,8 +1010,8 @@ int CEXEBuild::pp_define(LineParser&line)
|
|||
|
||||
int CEXEBuild::pp_undef(LineParser&line)
|
||||
{
|
||||
UINT noerr = false, stopswitch = false, ti = 1, handled = 0;
|
||||
for (; ti < line.getnumtokens(); ++ti)
|
||||
UINT noerr = false, stopswitch = false, handled = 0;
|
||||
for (int ti = 1; ti < line.getnumtokens(); ++ti)
|
||||
{
|
||||
const TCHAR *name = line.gettoken_str(ti);
|
||||
if (!stopswitch && !_tcsicmp(name, _T("/noerrors")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue