]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/include/scope_guard.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / include / scope_guard.h
index 878d8c169f5a34d6114fa39d74df1bad0c0e7e05..eacc65e7b6713696d0a8e491a927654c8eb8fc60 100644 (file)
@@ -35,11 +35,13 @@ struct scope_guard {
 };
 
 template <typename F>
+[[nodiscard("Unassigned scope guards will execute immediately")]]
 scope_guard<F> make_scope_guard(F &&f) {
   return scope_guard<F>(std::forward<F>(f));
 }
 
 template<typename F, typename... Args>
+[[nodiscard("Unassigned scope guards will execute immediately")]]
 scope_guard<F> make_scope_guard(std::in_place_type_t<F>, Args&& ...args) {
   return { std::in_place, std::forward<Args>(args)... };
 }