From: SourceForge.net <no...@so...> - 2012-04-02 06:02:57
|
Bugs item #3509427, was opened at 2012-03-20 10:01 Message generated for change (Comment added) made by rich_sposato You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=396644&aid=3509427&group_id=29557 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: King_DuckZ (kingduckz) >Assigned to: Richard Sposato (rich_sposato) Summary: Broken build on Visual Studio Initial Comment: Version 1177 on trunk doesn't build on VS 2005/2008. The problem is in a template method being instantiated with a reference as its template type T. The function then takes a T& argument, that results in a reference to a reference. In C++99 this is forbidden (cf. Standard §8.3.4). My solution was to use TypeTraits::ParameterType, but this has a couple disadvantages: 1) a dependency to TypeTraits.h in SafeFormat.h is added 2) automatic template deduction won't work anymore At least problem 1 could be solved by writing a "small" replacement for TypeTraits::ParameterType, which can be put in a leaf .h and reused elsewhere (that's a very low level feature IMO to carry any dependency). Unfortunately I couldn't spend too much time on the code, so maybe there's a better solution I don't see. ---------------------------------------------------------------------- >Comment By: Richard Sposato (rich_sposato) Date: 2012-04-01 23:02 Message: Fixed in revision 1179. Added use of Loki::TypeTraits. ---------------------------------------------------------------------- Comment By: King_DuckZ (kingduckz) Date: 2012-03-20 10:06 Message: Apparently the problem was introduced at revision 1160 "Added functions that print directly to cout" ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=396644&aid=3509427&group_id=29557 |