projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix expanding networks in Chat Monitor settings
[quassel.git]
/
src
/
common
/
types.h
diff --git
a/src/common/types.h
b/src/common/types.h
index
8782d74
..
a801de7
100644
(file)
--- a/
src/common/types.h
+++ b/
src/common/types.h
@@
-115,7
+115,7
@@
typedef QList<BufferId> BufferIdList;
* @returns A reference to the stream
*/
template<typename T,
* @returns A reference to the stream
*/
template<typename T,
- typename
std::enable_if<std::is_enum<T>{}, int>::type = 0
>
+ typename
= typename std::enable_if<std::is_enum<T>::value>::type
>
QDataStream &operator<<(QDataStream &out, T value) {
out << static_cast<typename std::underlying_type<T>::type>(value);
return out;
QDataStream &operator<<(QDataStream &out, T value) {
out << static_cast<typename std::underlying_type<T>::type>(value);
return out;
@@
-125,24
+125,14
@@
QDataStream &operator<<(QDataStream &out, T value) {
* Catch-all stream serialization operator for enum types.
*
* @param[in,out] in Stream to deserialize from
* Catch-all stream serialization operator for enum types.
*
* @param[in,out] in Stream to deserialize from
- * @param[
in]
value Value to deserialize into
+ * @param[
out]
value Value to deserialize into
* @returns A reference to the stream
*/
template<typename T,
* @returns A reference to the stream
*/
template<typename T,
- typename
std::enable_if<std::is_enum<T>{}, int>::type = 0
>
+ typename
= typename std::enable_if<std::is_enum<T>::value>::type
>
QDataStream &operator>>(QDataStream &in, T &value) {
typename std::underlying_type<T>::type v;
in >> v;
value = static_cast<T>(v);
return in;
}
QDataStream &operator>>(QDataStream &in, T &value) {
typename std::underlying_type<T>::type v;
in >> v;
value = static_cast<T>(v);
return in;
}
-
-//! Base class for exceptions.
-struct Exception {
- Exception(QString msg = "Unknown Exception") : _msg(msg) {}
- virtual ~Exception() {} // make gcc happy
- virtual inline QString msg() { return _msg; }
-
-protected:
- QString _msg;
-};