From 98d7b02f2b69f2f88a03054183933df7f190017d Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Thu, 7 Apr 2016 20:26:54 +0200 Subject: tdf#94306 replace boost::noncopyable in cppuhelper and related modules. Replace with C++11 delete copy-constructur and copy-assignment. Change-Id: I18aa9fe4ff696f9b5472cbe4cd0097cb174618b7 Reviewed-on: https://gerrit.libreoffice.org/23904 Tested-by: Jenkins Reviewed-by: Michael Stahl --- cppu/qa/test_any.cxx | 6 ++++-- cppu/qa/test_reference.cxx | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'cppu/qa') diff --git a/cppu/qa/test_any.cxx b/cppu/qa/test_any.cxx index 4fdd4a485edc..e173b1072f39 100644 --- a/cppu/qa/test_any.cxx +++ b/cppu/qa/test_any.cxx @@ -43,7 +43,6 @@ #include "Struct2.hpp" #include "Struct2a.hpp" #include "Struct2b.hpp" -#include "boost/noncopyable.hpp" #include "boost/type_traits/is_same.hpp" #include "com/sun/star/uno/Any.hxx" #include "com/sun/star/uno/Reference.hxx" @@ -59,10 +58,13 @@ namespace { -class Base: private boost::noncopyable { +class Base { public: Base(): m_count(0) {} + Base(const Base&) = delete; + const Base& operator=(const Base&) = delete; + void acquire() { if (osl_atomic_increment(&m_count) == SAL_MAX_INT32) { abort(); diff --git a/cppu/qa/test_reference.cxx b/cppu/qa/test_reference.cxx index 018776614166..c04b8b1e010f 100644 --- a/cppu/qa/test_reference.cxx +++ b/cppu/qa/test_reference.cxx @@ -19,7 +19,6 @@ #include -#include #include #include #include @@ -39,7 +38,7 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::RuntimeException; using ::com::sun::star::uno::UNO_SET_THROW; -class Foo: public Interface1, private boost::noncopyable +class Foo: public Interface1 { public: Foo() @@ -47,6 +46,9 @@ public: { } + Foo(const Foo&) = delete; + const Foo& operator=(const Foo&) = delete; + virtual Any SAL_CALL queryInterface(const Type & _type) throw (RuntimeException, std::exception) override { -- cgit