X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2FRefChanger.h;h=baf3d840eb982b850065cc481d286870c71faebe;hb=52dd5dc84f3a9f836903aeaca49f27e45cda6dce;hp=9b9d020a4119d063e3a7506265581de3926d8e96;hpb=43d284e15ad6193da2508a57b5260cb85ff4cdb9;p=features.git diff --git a/src/support/RefChanger.h b/src/support/RefChanger.h index 9b9d020a41..baf3d840eb 100644 --- a/src/support/RefChanger.h +++ b/src/support/RefChanger.h @@ -45,7 +45,19 @@ private: bool enabled; }; + +//for gcc 4.6 +#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 6) +template +struct RefChanger : unique_ptr> +{ + RefChanger(unique_ptr> p) + : unique_ptr>(move(p)) + {} +}; +#else template using RefChanger = unique_ptr>; +#endif /// Saves the value of \param ref in a movable object