diff options
Diffstat (limited to 'basebmp')
-rw-r--r-- | basebmp/source/intconversion.hxx | 11 |
1 files changed, 9 insertions, 2 deletions
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<typename T> struct SGI_identity : public std::unary_function<T,T> + { + 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<DataType> to; - typedef std::identity<DataType> from; + typedef SGI_identity<DataType> to; + typedef SGI_identity<DataType> from; }; template< unsigned int RedIndex, unsigned int GreenIndex, |