diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-11-23 15:43:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-11-23 15:45:10 +0000 |
commit | 5f0401a2ef24f286f5d2c7f8a96379328ebfe287 (patch) | |
tree | 8c98899f81599c125e316ec6672e2448878167ca /dbaccess | |
parent | ac6dd66266c39ca08345d630290e60876d21c822 (diff) |
make possible to build with c++0x
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/browser/genericcontroller.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index 72247c93a..4b3fd33ae 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -1571,6 +1571,16 @@ Sequence< ::sal_Int16 > SAL_CALL OGenericUnoController::getSupportedCommandGroup return aCommandGroups; } +namespace +{ + //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; } + }; +} + // ----------------------------------------------------------------------------- Sequence< DispatchInformation > SAL_CALL OGenericUnoController::getConfigurableDispatchInformation( ::sal_Int16 CommandGroup ) throw (RuntimeException) { @@ -1592,7 +1602,7 @@ Sequence< DispatchInformation > SAL_CALL OGenericUnoController::getConfigurableD ::std::transform( aInformationList.begin(), aInformationList.end(), aInformation.getArray(), - ::std::identity< DispatchInformation >() + SGI_identity< DispatchInformation >() ); return aInformation; |