aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vmime/base.hpp17
-rw-r--r--src/vmime/context.hpp2
-rw-r--r--src/vmime/encoding.cpp4
-rw-r--r--src/vmime/utility/stream.hpp7
4 files changed, 7 insertions, 23 deletions
diff --git a/src/vmime/base.hpp b/src/vmime/base.hpp
index 77824771..34b8b535 100644
--- a/src/vmime/base.hpp
+++ b/src/vmime/base.hpp
@@ -232,23 +232,6 @@ namespace vmime {
return const_pointer_cast <X, Y>(obj);
}
-
- /** Inherit from this class to indicate the subclass is not copyable,
- * ie. you want to prohibit copy construction and copy assignment.
- */
- class VMIME_EXPORT noncopyable {
-
- protected:
-
- noncopyable() { }
- virtual ~noncopyable() { }
-
- private:
-
- noncopyable(const noncopyable&);
- void operator=(const noncopyable&);
- };
-
} // vmime
diff --git a/src/vmime/context.hpp b/src/vmime/context.hpp
index 1d009500..1c9f6216 100644
--- a/src/vmime/context.hpp
+++ b/src/vmime/context.hpp
@@ -106,7 +106,7 @@ protected:
context();
context(const context& ctx);
- virtual context& operator=(const context& ctx);
+ context& operator=(const context& ctx);
void copyFrom(const context& ctx);
bool m_internationalizedEmail;
diff --git a/src/vmime/encoding.cpp b/src/vmime/encoding.cpp
index 132c010f..e66e268a 100644
--- a/src/vmime/encoding.cpp
+++ b/src/vmime/encoding.cpp
@@ -157,9 +157,7 @@ const encoding encoding::decideImpl(
const string::difference_type length = end - begin;
const string::difference_type count = std::count_if(
- begin, end,
- std::bind2nd(std::less<unsigned char>(), 127)
- );
+ begin, end, [](unsigned char x) { return x < 127; });
// All is in 7-bit US-ASCII --> 7-bit (or Quoted-Printable...)
if (length == count) {
diff --git a/src/vmime/utility/stream.hpp b/src/vmime/utility/stream.hpp
index 9aa13923..8ea94df0 100644
--- a/src/vmime/utility/stream.hpp
+++ b/src/vmime/utility/stream.hpp
@@ -38,9 +38,12 @@ namespace utility {
/** Base class for input/output stream.
*/
-class VMIME_EXPORT stream : public object, private noncopyable {
-
+class VMIME_EXPORT stream : public object {
public:
+ stream() = default;
+ /* Presence of move-ctor/move-asg inhibits default copy-ctor/copy-asg */
+ stream(stream &&) = default;
+ stream &operator=(stream &&) = default;
virtual ~stream() { }