← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2746: Simplify GETSET (duh!)

 

------------------------------------------------------------
revno: 2746
committer: Jacek Sieka <arnetheduck@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Fri 2011-12-23 22:25:19 +0100
message:
  Simplify GETSET (duh!)
modified:
  dcpp/GetSet.h


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/GetSet.h'
--- dcpp/GetSet.h	2011-12-23 21:15:27 +0000
+++ dcpp/GetSet.h	2011-12-23 21:25:19 +0000
@@ -19,11 +19,10 @@
 #ifndef DCPLUSPLUS_DCPP_GET_SET_H
 #define DCPLUSPLUS_DCPP_GET_SET_H
 
-#include <boost/mpl/eval_if.hpp>
-#include <boost/mpl/identity.hpp>
+#include <boost/mpl/if.hpp>
 #include <type_traits>
 
-#define REF_OR_COPY(t) boost::mpl::eval_if_c<std::is_class<t>::value, std::add_lvalue_reference<std::add_const<t>::type>, boost::mpl::identity<t>>::type
+#define REF_OR_COPY(t) boost::mpl::if_c<std::is_class<t>::value, const t&, t>::type
 
 #define GETSET(type, name, name2) \
 private: type name; \