From 43bc8a784e706149fc7736fd8b4c440c464c49c4 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 23 Nov 2010 15:47:07 +0000 Subject: make possible to build with c++0x --- basebmp/source/intconversion.hxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'basebmp') diff --git a/basebmp/source/intconversion.hxx b/basebmp/source/intconversion.hxx index d18a88cfe912..407948e80c28 100644 --- a/basebmp/source/intconversion.hxx +++ b/basebmp/source/intconversion.hxx @@ -57,11 +57,18 @@ namespace basebmp } }; + //Current c++0x draft (apparently) has std::identity, but not operator() + template struct SGI_identity : public std::unary_function + { + T& operator()(T& x) const { return x; } + const T& operator()(const T& x) const { return x; } + }; + /// Get converter from given data type to sal_uInt32 template< typename DataType > struct uInt32Converter { - typedef std::identity to; - typedef std::identity from; + typedef SGI_identity to; + typedef SGI_identity from; }; template< unsigned int RedIndex, unsigned int GreenIndex, -- cgit v1.2.3