diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-11-23 15:47:07 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-11-23 15:47:19 +0000 |
commit | 43bc8a784e706149fc7736fd8b4c440c464c49c4 (patch) | |
tree | 6313ba0a7fe145ae120dbb29880b35ab9efd854a /basebmp | |
parent | ff1edf5a380baa88405feb325066ac70e01de507 (diff) |
make possible to build with c++0x
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, |