summaryrefslogtreecommitdiff
path: root/glib/glibmm/ustring.h
diff options
context:
space:
mode:
Diffstat (limited to 'glib/glibmm/ustring.h')
-rw-r--r--glib/glibmm/ustring.h54
1 files changed, 30 insertions, 24 deletions
diff --git a/glib/glibmm/ustring.h b/glib/glibmm/ustring.h
index c93a7d7e..3f74be7d 100644
--- a/glib/glibmm/ustring.h
+++ b/glib/glibmm/ustring.h
@@ -875,6 +875,12 @@ struct ustring::SequenceToString<Glib::ustring::const_iterator, gunichar> : publ
class ustring::FormatStream
{
+public:
+
+ // noncopyable
+ FormatStream(const ustring::FormatStream&) = delete;
+ FormatStream& operator=(const ustring::FormatStream&) = delete;
+
private:
#ifdef GLIBMM_HAVE_WIDE_STREAM
typedef std::wostringstream StreamType;
@@ -883,10 +889,6 @@ private:
#endif
StreamType stream_;
- // noncopyable
- FormatStream(const ustring::FormatStream&);
- FormatStream& operator=(const ustring::FormatStream&);
-
public:
FormatStream();
~FormatStream();
@@ -1261,16 +1263,16 @@ class ustring::Stringify
private:
ustring string_;
- // noncopyable
- Stringify(const ustring::Stringify<T>&);
- Stringify<T>& operator=(const ustring::Stringify<T>&);
-
public:
explicit inline Stringify(const T& arg) : string_ (ustring::format(arg)) {}
//TODO: Why is this here? See the template specialization:
explicit inline Stringify(const char* arg) : string_(arg) {}
+ // noncopyable
+ Stringify(const ustring::Stringify<T>&) = delete;
+ Stringify<T>& operator=(const ustring::Stringify<T>&) = delete;
+
inline const ustring* ptr() const { return &string_; }
};
@@ -1281,12 +1283,13 @@ class ustring::Stringify<ustring>
private:
const ustring& string_;
- // noncopyable
- Stringify(const ustring::Stringify<ustring>&);
- Stringify<ustring>& operator=(const ustring::Stringify<ustring>&);
-
public:
explicit inline Stringify(const ustring& arg) : string_(arg) {}
+
+ // noncopyable
+ Stringify(const ustring::Stringify<ustring>&) = delete;
+ Stringify<ustring>& operator=(const ustring::Stringify<ustring>&) = delete;
+
inline const ustring* ptr() const { return &string_; }
};
@@ -1299,12 +1302,13 @@ class ustring::Stringify<const char*>
private:
const ustring string_;
- // noncopyable
- Stringify(const ustring::Stringify<const char*>&);
- Stringify<ustring>& operator=(const ustring::Stringify<const char*>&);
-
public:
explicit inline Stringify(const char* arg) : string_(arg) {}
+
+ // noncopyable
+ Stringify(const ustring::Stringify<const char*>&) = delete;
+ Stringify<ustring>& operator=(const ustring::Stringify<const char*>&) = delete;
+
inline const ustring* ptr() const { return &string_; }
};
@@ -1317,12 +1321,13 @@ class ustring::Stringify<char[N]>
private:
const ustring string_;
- // noncopyable
- Stringify(const ustring::Stringify<char[N]>&);
- Stringify<ustring>& operator=(const ustring::Stringify<char[N]>&);
-
public:
explicit inline Stringify(const char arg[N]) : string_(arg) {}
+
+ // noncopyable
+ Stringify(const ustring::Stringify<char[N]>&) = delete;
+ Stringify<ustring>& operator=(const ustring::Stringify<char[N]>&) = delete;
+
inline const ustring* ptr() const { return &string_; }
};
@@ -1336,12 +1341,13 @@ class ustring::Stringify<const char[N]>
private:
const ustring string_;
- // noncopyable
- Stringify(const ustring::Stringify<const char[N]>&);
- Stringify<ustring>& operator=(const ustring::Stringify<const char[N]>&);
-
public:
explicit inline Stringify(const char arg[N]) : string_(arg) {}
+
+ // noncopyable
+ Stringify(const ustring::Stringify<const char[N]>&) = delete;
+ Stringify<ustring>& operator=(const ustring::Stringify<const char[N]>&) = delete;
+
inline const ustring* ptr() const { return &string_; }
};