|
Boost-Commit : |
From: daniel_james_at_[hidden]
Date: 2008-01-10 07:53:04
Author: danieljames
Date: 2008-01-10 07:53:04 EST (Thu, 10 Jan 2008)
New Revision: 42655
URL: http://svn.boost.org/trac/boost/changeset/42655
Log:
Use type traits to get a const value in order to avoid a Borland bug.
Text files modified:
branches/unordered/trunk/libs/unordered/test/helpers/generators.hpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
Modified: branches/unordered/trunk/libs/unordered/test/helpers/generators.hpp
==============================================================================
--- branches/unordered/trunk/libs/unordered/test/helpers/generators.hpp (original)
+++ branches/unordered/trunk/libs/unordered/test/helpers/generators.hpp 2008-01-10 07:53:04 EST (Thu, 10 Jan 2008)
@@ -15,6 +15,7 @@
#include <utility>
#include <stdexcept>
#include <cstdlib>
+#include <boost/type_traits/add_const.hpp>
#include "./fwd.hpp"
@@ -43,9 +44,10 @@
struct generator
{
typedef T value_type;
- value_type operator()()
+ typedef BOOST_DEDUCED_TYPENAME boost::add_const<T>::type const_value_type;
+ value_type operator()() const
{
- return generate((T const*) 0);
+ return generate((const_value_type*) 0);
}
};
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk