SetFlag(bool &r, bool v = true): SetForScope<bool>(r, v) { }
};
+
+template<typename T>
+class Conditional
+{
+private:
+ char buf[sizeof(T)];
+ T *obj;
+
+public:
+ template<typename A>
+ Conditional(bool c, const A &a): obj(c ? new(buf) T(a) : 0) { }
+
+ template<typename A0, typename A1>
+ Conditional(bool c, const A0 &a0, const A1 &a1): obj(c ? new(buf) T(a0, a1) : 0) { }
+
+ ~Conditional() { if(obj) obj->~T(); }
+};
+
} // namespace Msp
#endif