summaryrefslogtreecommitdiff
path: root/include/cppuhelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-09-17 12:36:51 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-09-17 13:28:21 +0200
commitba4241ee9987492061e9bfb07beb1bbd2bae67c8 (patch)
treed41063a9038df6ba5027b7de82b763a545565ddd /include/cppuhelper
parent3c967717d315fba0aa7b1a1ba3567edc0a88bb69 (diff)
Silence -Werror,-Wdeprecated-copy-with-user-provided-copy (clang-cl)
> In file included from cppuhelper/source/access_control.cxx:21: > include\cppuhelper/access_control.hxx(58,5): error: definition of implicit copy assignment operator for 'AccessControl' is deprecated because it has a user-provided copy constructor [-Werror,-Wdeprecated-copy-with-user-provided-copy] > AccessControl( ::cppu::AccessControl const & ac ); > ^ > include\cppuhelper/access_control.hxx(37,44): note: in implicit copy assignment operator for 'cppu::AccessControl' first required here > class SAL_WARN_UNUSED CPPUHELPER_DLLPUBLIC AccessControl > ^ > include\cppuhelper/access_control.hxx(37,23): note: due to 'AccessControl' being dllexported > class SAL_WARN_UNUSED CPPUHELPER_DLLPUBLIC AccessControl > ^ > include\cppuhelper/cppuhelperdllapi.h(30,30): note: expanded from macro 'CPPUHELPER_DLLPUBLIC' > #define CPPUHELPER_DLLPUBLIC SAL_DLLPUBLIC_EXPORT > ^ > include\sal/types.h(208,47): note: expanded from macro 'SAL_DLLPUBLIC_EXPORT' > # define SAL_DLLPUBLIC_EXPORT __declspec(dllexport) Change-Id: I89b534b33c29fdc2d458087e1f3c2f4c958aa86c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140096 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/cppuhelper')
-rw-r--r--include/cppuhelper/access_control.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/cppuhelper/access_control.hxx b/include/cppuhelper/access_control.hxx
index d0c382cdf179..24e619301629 100644
--- a/include/cppuhelper/access_control.hxx
+++ b/include/cppuhelper/access_control.hxx
@@ -57,6 +57,10 @@ public:
*/
AccessControl( ::cppu::AccessControl const & ac );
+#if defined LIBO_INTERNAL_ONLY
+ AccessControl & operator =(AccessControl const &) = default; // avoid deprecation warnings
+#endif
+
/** Clears the access controller reference being used.
*/
void SAL_CALL clear()