util: disable unique_resource
We are not using it anywhere and it is causing compilation
warnings (errors in debug builds) with clang 19 and later.
Change-Id: I5f48b3bae28adc9ba3bb115513b5f6eed1529acf
diff --git a/ndn-cxx/detail/nonstd/scope-lite.hpp b/ndn-cxx/detail/nonstd/scope-lite.hpp
index 83ed338..1cfb783 100644
--- a/ndn-cxx/detail/nonstd/scope-lite.hpp
+++ b/ndn-cxx/detail/nonstd/scope-lite.hpp
@@ -886,6 +886,8 @@
// unique_resource:
+#if 0 // https://github.com/martinmoene/scope-lite/issues/15
+
template< class R, class D >
class unique_resource
{
@@ -1130,8 +1132,8 @@
}
scope_is_delete_access:
- unique_resource & operator=( unique_resource const & ) scope_is_delete;
- unique_resource( unique_resource const & ) scope_is_delete;
+ unique_resource & operator=( unique_resource const & ) scope_is_delete;
+ unique_resource( unique_resource const & ) scope_is_delete;
private:
R1 resource;
@@ -1206,6 +1208,8 @@
#endif // scope_HAVE_DEFAULT_FUNCTION_TEMPLATE_ARG
+#endif // https://github.com/martinmoene/scope-lite/issues/15
+
#else // #if scope_USE_POST_CPP98_VERSION
//
@@ -1396,7 +1400,7 @@
try
{
reset();
- resource = r;
+ resource = r;
execute_on_reset = true;
}
catch(...)
@@ -1481,12 +1485,10 @@
using scope::scope_exit;
using scope::scope_fail;
using scope::scope_success;
- using scope::unique_resource;
using scope::make_scope_exit;
using scope::make_scope_fail;
using scope::make_scope_success;
- using scope::make_unique_resource_checked;
}
#endif // scope_USES_STD_SCOPE
diff --git a/ndn-cxx/util/scope.hpp b/ndn-cxx/util/scope.hpp
index 9133eda..daea8fe 100644
--- a/ndn-cxx/util/scope.hpp
+++ b/ndn-cxx/util/scope.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -30,12 +30,10 @@
using ::nonstd::scope_exit;
using ::nonstd::scope_fail;
using ::nonstd::scope_success;
-using ::nonstd::unique_resource;
using ::nonstd::make_scope_exit;
using ::nonstd::make_scope_fail;
using ::nonstd::make_scope_success;
-using ::nonstd::make_unique_resource_checked;
} // namespace ndn