linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #06254
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3119: msvc variadic template support is still buggy
------------------------------------------------------------
revno: 3119
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Thu 2012-11-08 18:36:44 +0100
message:
msvc variadic template support is still buggy
modified:
SConstruct
dcpp/FavoriteManager.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'SConstruct'
--- SConstruct 2012-11-06 19:04:43 +0000
+++ SConstruct 2012-11-08 17:36:44 +0000
@@ -73,8 +73,9 @@
'release' : []
}
+# TODO remove _VARIADIC_MAX if/when VC has proper variadic template support
msvc_defs = {
- 'common' : ['_REENTRANT', 'snprintf=_snprintf'],
+ 'common' : ['_REENTRANT', '_VARIADIC_MAX=10', 'snprintf=_snprintf'],
'debug' : ['_DEBUG', '_HAS_ITERATOR_DEBUGGING=0', '_SECURE_SCL=0'],
'release' : ['NDEBUG']
}
=== modified file 'dcpp/FavoriteManager.cpp'
--- dcpp/FavoriteManager.cpp 2012-11-06 17:50:04 +0000
+++ dcpp/FavoriteManager.cpp 2012-11-08 17:36:44 +0000
@@ -287,7 +287,8 @@
const string& maxUsers = getAttrib(attribs, "Maxusers", 5);
const string& reliability = getAttrib(attribs, "Reliability", 5);
const string& rating = getAttrib(attribs, "Rating", 5);
- publicHubs.emplace_back(name, server, description, users, country, shared, minShare, minSlots, maxHubs, maxUsers, reliability, rating);
+ /// @todo change to emplace_back when MSVC has templates with var args, thus allowing these 12 arguments! (its current emulation only goes up to 10)
+ publicHubs.push_back(HubEntry(name, server, description, users, country, shared, minShare, minSlots, maxHubs, maxUsers, reliability, rating));
}
}
private: