Reduce unnecessary inclusions of `detail/common.hpp`
Change-Id: I79dcd05297594ccd4489d8cddddb879655373cc0
diff --git a/ndn-cxx/detail/cancel-handle.hpp b/ndn-cxx/detail/cancel-handle.hpp
index 65dc110..cffa057 100644
--- a/ndn-cxx/detail/cancel-handle.hpp
+++ b/ndn-cxx/detail/cancel-handle.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -22,7 +22,9 @@
#ifndef NDN_CXX_DETAIL_CANCEL_HANDLE_HPP
#define NDN_CXX_DETAIL_CANCEL_HANDLE_HPP
-#include "ndn-cxx/detail/common.hpp"
+#include <functional>
+#include <type_traits>
+#include <utility>
/**
* \brief Contains implementation details that are not part of the ndn-cxx public API.
diff --git a/ndn-cxx/detail/cf-releaser-osx.hpp b/ndn-cxx/detail/cf-releaser-osx.hpp
index 4ff6b66..0c5b8c6 100644
--- a/ndn-cxx/detail/cf-releaser-osx.hpp
+++ b/ndn-cxx/detail/cf-releaser-osx.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -22,13 +22,14 @@
#ifndef NDN_CXX_DETAIL_CF_RELEASER_OSX_HPP
#define NDN_CXX_DETAIL_CF_RELEASER_OSX_HPP
-#include "ndn-cxx/detail/common.hpp"
+#include "ndn-cxx/detail/config.hpp"
#ifndef NDN_CXX_HAVE_OSX_FRAMEWORKS
#error "This file should not be included ..."
#endif
#include <CoreFoundation/CoreFoundation.h>
+#include <cstddef>
namespace ndn::detail {
diff --git a/ndn-cxx/detail/cf-string-osx.cpp b/ndn-cxx/detail/cf-string-osx.cpp
index 1459f81..45f67ec 100644
--- a/ndn-cxx/detail/cf-string-osx.cpp
+++ b/ndn-cxx/detail/cf-string-osx.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -20,6 +20,7 @@
*/
#include "ndn-cxx/detail/cf-string-osx.hpp"
+#include "ndn-cxx/detail/common.hpp"
namespace ndn::detail::cfstring {
diff --git a/ndn-cxx/detail/cf-string-osx.hpp b/ndn-cxx/detail/cf-string-osx.hpp
index 4cabdcb..74e96ce 100644
--- a/ndn-cxx/detail/cf-string-osx.hpp
+++ b/ndn-cxx/detail/cf-string-osx.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -22,7 +22,7 @@
#ifndef NDN_CXX_DETAIL_CF_STRING_OSX_HPP
#define NDN_CXX_DETAIL_CF_STRING_OSX_HPP
-#include "ndn-cxx/detail/common.hpp"
+#include "ndn-cxx/detail/config.hpp"
#ifndef NDN_CXX_HAVE_OSX_FRAMEWORKS
#error "This file should not be included ..."
@@ -30,6 +30,9 @@
#include "ndn-cxx/detail/cf-releaser-osx.hpp"
+#include <cstdint>
+#include <string>
+
/**
* @file
*
diff --git a/ndn-cxx/detail/tag-host.hpp b/ndn-cxx/detail/tag-host.hpp
index 05b3c41..d4c4bc1 100644
--- a/ndn-cxx/detail/tag-host.hpp
+++ b/ndn-cxx/detail/tag-host.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -22,10 +22,11 @@
#ifndef NDN_CXX_DETAIL_TAG_HOST_HPP
#define NDN_CXX_DETAIL_TAG_HOST_HPP
-#include "ndn-cxx/detail/common.hpp"
#include "ndn-cxx/tag.hpp"
#include <map>
+#include <memory>
+#include <type_traits>
namespace ndn {
@@ -41,7 +42,7 @@
* \retval nullptr if no Tag of type T is stored
*/
template<typename T>
- shared_ptr<T>
+ std::shared_ptr<T>
getTag() const;
/**
@@ -51,7 +52,7 @@
*/
template<typename T>
void
- setTag(shared_ptr<T> tag) const;
+ setTag(std::shared_ptr<T> tag) const;
/**
* \brief Remove a tag item.
@@ -63,11 +64,11 @@
removeTag() const;
private:
- mutable std::map<int, shared_ptr<Tag>> m_tags;
+ mutable std::map<int, std::shared_ptr<Tag>> m_tags;
};
template<typename T>
-shared_ptr<T>
+std::shared_ptr<T>
TagHost::getTag() const
{
static_assert(std::is_convertible_v<T*, Tag*>, "T must inherit from ndn::Tag");
@@ -80,7 +81,7 @@
template<typename T>
void
-TagHost::setTag(shared_ptr<T> tag) const
+TagHost::setTag(std::shared_ptr<T> tag) const
{
static_assert(std::is_convertible_v<T*, Tag*>, "T must inherit from ndn::Tag");
diff --git a/ndn-cxx/encoding/buffer-stream.cpp b/ndn-cxx/encoding/buffer-stream.cpp
index 6ee415d..2481b9f 100644
--- a/ndn-cxx/encoding/buffer-stream.cpp
+++ b/ndn-cxx/encoding/buffer-stream.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2022 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).
*
@@ -54,7 +54,7 @@
}
}
-shared_ptr<Buffer>
+std::shared_ptr<Buffer>
OBufferStream::buf()
{
if (is_open()) {
diff --git a/ndn-cxx/encoding/buffer-stream.hpp b/ndn-cxx/encoding/buffer-stream.hpp
index 16e4806..e6f8daa 100644
--- a/ndn-cxx/encoding/buffer-stream.hpp
+++ b/ndn-cxx/encoding/buffer-stream.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2022 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).
*
@@ -76,11 +76,11 @@
/**
* @brief Return a shared pointer to the underlying buffer.
*/
- shared_ptr<Buffer>
+ std::shared_ptr<Buffer>
buf();
private:
- shared_ptr<Buffer> m_buffer;
+ std::shared_ptr<Buffer> m_buffer;
};
} // namespace ndn
diff --git a/ndn-cxx/encoding/buffer.hpp b/ndn-cxx/encoding/buffer.hpp
index 591ff9b..a9b5ba3 100644
--- a/ndn-cxx/encoding/buffer.hpp
+++ b/ndn-cxx/encoding/buffer.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).
*
@@ -24,15 +24,16 @@
#ifndef NDN_CXX_ENCODING_BUFFER_HPP
#define NDN_CXX_ENCODING_BUFFER_HPP
-#include "ndn-cxx/detail/common.hpp"
-
+#include <cstdint>
#include <initializer_list>
+#include <iosfwd>
+#include <memory>
#include <vector>
namespace ndn {
/**
- * @brief General-purpose automatically managed/resized buffer
+ * @brief General-purpose automatically managed/resized buffer.
*
* In most respect, the Buffer class is equivalent to a `std::vector<uint8_t>`, and it in fact
* uses the latter as a base class. In addition to that, it provides the get<T>() helper method
@@ -135,8 +136,8 @@
boost_test_print_type(std::ostream&, const Buffer&);
/** \endcond */
-using BufferPtr = shared_ptr<Buffer>;
-using ConstBufferPtr = shared_ptr<const Buffer>;
+using BufferPtr = std::shared_ptr<Buffer>;
+using ConstBufferPtr = std::shared_ptr<const Buffer>;
} // namespace ndn
diff --git a/ndn-cxx/encoding/encoding-buffer-fwd.hpp b/ndn-cxx/encoding/encoding-buffer-fwd.hpp
index 02f4016..dce8860 100644
--- a/ndn-cxx/encoding/encoding-buffer-fwd.hpp
+++ b/ndn-cxx/encoding/encoding-buffer-fwd.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).
*
@@ -22,8 +22,6 @@
#ifndef NDN_CXX_ENCODING_ENCODING_BUFFER_FWD_HPP
#define NDN_CXX_ENCODING_ENCODING_BUFFER_FWD_HPP
-#include "ndn-cxx/detail/common.hpp"
-
namespace ndn {
namespace encoding {
diff --git a/ndn-cxx/net/dns.hpp b/ndn-cxx/net/dns.hpp
index 482484d..011db11 100644
--- a/ndn-cxx/net/dns.hpp
+++ b/ndn-cxx/net/dns.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -27,6 +27,9 @@
#include <boost/asio/ip/address.hpp>
+#include <functional>
+#include <string>
+
namespace ndn::dns {
using AddressSelector = std::function<bool(const boost::asio::ip::address&)>;
diff --git a/ndn-cxx/net/face-uri.cpp b/ndn-cxx/net/face-uri.cpp
index b25f178..b3281c6 100644
--- a/ndn-cxx/net/face-uri.cpp
+++ b/ndn-cxx/net/face-uri.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 Regents of the University of California,
+ * Copyright (c) 2013-2024 Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,6 +26,8 @@
*/
#include "ndn-cxx/net/face-uri.hpp"
+
+#include "ndn-cxx/detail/common.hpp"
#include "ndn-cxx/net/dns.hpp"
#include "ndn-cxx/util/string-helper.hpp"
@@ -116,7 +118,7 @@
m_isV6 = endpoint.address().is_v6();
m_scheme = m_isV6 ? "udp6" : "udp4";
m_host = endpoint.address().to_string();
- m_port = to_string(endpoint.port());
+ m_port = std::to_string(endpoint.port());
}
FaceUri::FaceUri(const boost::asio::ip::tcp::endpoint& endpoint)
@@ -124,7 +126,7 @@
m_isV6 = endpoint.address().is_v6();
m_scheme = m_isV6 ? "tcp6" : "tcp4";
m_host = endpoint.address().to_string();
- m_port = to_string(endpoint.port());
+ m_port = std::to_string(endpoint.port());
}
FaceUri::FaceUri(const boost::asio::ip::tcp::endpoint& endpoint, std::string_view scheme)
@@ -132,7 +134,7 @@
m_isV6 = endpoint.address().is_v6();
m_scheme = scheme;
m_host = endpoint.address().to_string();
- m_port = to_string(endpoint.port());
+ m_port = std::to_string(endpoint.port());
}
#ifdef BOOST_ASIO_HAS_LOCAL_SOCKETS
@@ -155,7 +157,7 @@
{
FaceUri uri;
uri.m_scheme = "fd";
- uri.m_host = to_string(fd);
+ uri.m_host = std::to_string(fd);
return uri;
}
@@ -174,7 +176,7 @@
FaceUri uri;
uri.m_scheme = endpoint.address().is_v6() ? "udp6+dev" : "udp4+dev";
uri.m_host = ifname;
- uri.m_port = to_string(endpoint.port());
+ uri.m_port = std::to_string(endpoint.port());
return uri;
}
@@ -203,7 +205,8 @@
}
-/** \brief A CanonizeProvider provides FaceUri canonization functionality for a group of schemes.
+/**
+ * \brief A CanonizeProvider provides FaceUri canonization functionality for a group of schemes.
*/
class CanonizeProvider : noncopyable
{
@@ -296,7 +299,7 @@
}
// make a copy because caller may modify faceUri
- auto uri = make_shared<FaceUri>(faceUri);
+ auto uri = std::make_shared<FaceUri>(faceUri);
boost::system::error_code ec;
auto ipAddress = boost::asio::ip::make_address(unescapeHost(faceUri.getHost()), ec);
if (!ec) {
@@ -343,7 +346,7 @@
private:
void
- onDnsSuccess(const shared_ptr<FaceUri>& faceUri,
+ onDnsSuccess(const std::shared_ptr<FaceUri>& faceUri,
const FaceUri::CanonizeSuccessCallback& onSuccess,
const FaceUri::CanonizeFailureCallback& onFailure,
const boost::asio::ip::address& ipAddress) const
@@ -372,7 +375,7 @@
}
void
- onDnsFailure(const shared_ptr<FaceUri>&,
+ onDnsFailure(const std::shared_ptr<FaceUri>&,
const FaceUri::CanonizeFailureCallback& onFailure,
const std::string& reason) const
{
@@ -558,7 +561,7 @@
UdpDevCanonizeProvider>;
static_assert(boost::mp11::mp_is_set<CanonizeProviders>());
-using CanonizeProviderTable = std::map<std::string, shared_ptr<CanonizeProvider>>;
+using CanonizeProviderTable = std::map<std::string, std::shared_ptr<CanonizeProvider>>;
struct CanonizeProviderTableInitializer
{
@@ -566,7 +569,7 @@
void
operator()(boost::mp11::mp_identity<CP>)
{
- shared_ptr<CanonizeProvider> cp = make_shared<CP>();
+ std::shared_ptr<CanonizeProvider> cp = std::make_shared<CP>();
auto schemes = cp->getSchemes();
BOOST_ASSERT(!schemes.empty());
diff --git a/ndn-cxx/net/network-address.hpp b/ndn-cxx/net/network-address.hpp
index d70e611..de3c58d 100644
--- a/ndn-cxx/net/network-address.hpp
+++ b/ndn-cxx/net/network-address.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -24,7 +24,8 @@
#ifndef NDN_CXX_NET_NETWORK_ADDRESS_HPP
#define NDN_CXX_NET_NETWORK_ADDRESS_HPP
-#include "ndn-cxx/detail/common.hpp"
+#include <cstdint>
+#include <iosfwd>
#include <boost/asio/ip/address.hpp>
diff --git a/ndn-cxx/security/impl/openssl-helper.hpp b/ndn-cxx/security/impl/openssl-helper.hpp
index 2863277..2da7a7e 100644
--- a/ndn-cxx/security/impl/openssl-helper.hpp
+++ b/ndn-cxx/security/impl/openssl-helper.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -22,6 +22,7 @@
#ifndef NDN_CXX_SECURITY_IMPL_OPENSSL_HELPER_HPP
#define NDN_CXX_SECURITY_IMPL_OPENSSL_HELPER_HPP
+#include "ndn-cxx/detail/common.hpp"
#include "ndn-cxx/security/security-common.hpp"
#include <openssl/bio.h>
diff --git a/ndn-cxx/security/security-common.cpp b/ndn-cxx/security/security-common.cpp
index abf0b32..47e2050 100644
--- a/ndn-cxx/security/security-common.cpp
+++ b/ndn-cxx/security/security-common.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2019 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).
*
@@ -20,6 +20,7 @@
*/
#include "ndn-cxx/security/security-common.hpp"
+#include "ndn-cxx/util/backports.hpp"
#include <ostream>
diff --git a/ndn-cxx/security/security-common.hpp b/ndn-cxx/security/security-common.hpp
index 8100a7c..101a475 100644
--- a/ndn-cxx/security/security-common.hpp
+++ b/ndn-cxx/security/security-common.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -22,9 +22,10 @@
#ifndef NDN_CXX_SECURITY_SECURITY_COMMON_HPP
#define NDN_CXX_SECURITY_SECURITY_COMMON_HPP
-#include "ndn-cxx/detail/common.hpp"
#include "ndn-cxx/util/span.hpp"
+#include <cstdint>
+#include <iosfwd>
#include <vector>
namespace ndn {
diff --git a/ndn-cxx/security/transform/private-key.hpp b/ndn-cxx/security/transform/private-key.hpp
index 271ffd4..2922eb3 100644
--- a/ndn-cxx/security/transform/private-key.hpp
+++ b/ndn-cxx/security/transform/private-key.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -22,8 +22,9 @@
#ifndef NDN_CXX_SECURITY_TRANSFORM_PRIVATE_KEY_HPP
#define NDN_CXX_SECURITY_TRANSFORM_PRIVATE_KEY_HPP
-#include "ndn-cxx/security/security-common.hpp"
+#include "ndn-cxx/detail/common.hpp"
#include "ndn-cxx/encoding/buffer.hpp"
+#include "ndn-cxx/security/security-common.hpp"
namespace ndn {
@@ -32,7 +33,7 @@
namespace security::transform {
/**
- * @brief Abstraction of private key in crypto transformation
+ * @brief Abstraction of a private key in crypto transformations.
*/
class PrivateKey : noncopyable
{
diff --git a/ndn-cxx/security/transform/public-key.hpp b/ndn-cxx/security/transform/public-key.hpp
index b0b3104..eaa9b4e 100644
--- a/ndn-cxx/security/transform/public-key.hpp
+++ b/ndn-cxx/security/transform/public-key.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -22,13 +22,14 @@
#ifndef NDN_CXX_SECURITY_TRANSFORM_PUBLIC_KEY_HPP
#define NDN_CXX_SECURITY_TRANSFORM_PUBLIC_KEY_HPP
-#include "ndn-cxx/security/security-common.hpp"
+#include "ndn-cxx/detail/common.hpp"
#include "ndn-cxx/encoding/buffer.hpp"
+#include "ndn-cxx/security/security-common.hpp"
namespace ndn::security::transform {
/**
- * @brief Abstraction of public key in crypto transformation
+ * @brief Abstraction of a public key in crypto transformations.
*/
class PublicKey : noncopyable
{
diff --git a/ndn-cxx/security/validation-error.cpp b/ndn-cxx/security/validation-error.cpp
index 82ec2f7..4043b26 100644
--- a/ndn-cxx/security/validation-error.cpp
+++ b/ndn-cxx/security/validation-error.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -20,6 +20,9 @@
*/
#include "ndn-cxx/security/validation-error.hpp"
+#include "ndn-cxx/util/backports.hpp"
+
+#include <ostream>
namespace ndn::security {
diff --git a/ndn-cxx/security/validation-error.hpp b/ndn-cxx/security/validation-error.hpp
index 9adac22..461e50b 100644
--- a/ndn-cxx/security/validation-error.hpp
+++ b/ndn-cxx/security/validation-error.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -22,7 +22,9 @@
#ifndef NDN_CXX_SECURITY_VALIDATION_ERROR_HPP
#define NDN_CXX_SECURITY_VALIDATION_ERROR_HPP
-#include "ndn-cxx/detail/common.hpp"
+#include <cstdint>
+#include <iosfwd>
+#include <string>
namespace ndn::security {
diff --git a/ndn-cxx/util/backports.hpp b/ndn-cxx/util/backports.hpp
index 18c2c98..b13cf39 100644
--- a/ndn-cxx/util/backports.hpp
+++ b/ndn-cxx/util/backports.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -22,14 +22,14 @@
#ifndef NDN_CXX_UTIL_BACKPORTS_HPP
#define NDN_CXX_UTIL_BACKPORTS_HPP
-#include "ndn-cxx/detail/common.hpp"
+#include <type_traits>
+#include <utility>
+#include <boost/assert.hpp>
#include <boost/predef/compiler/clang.h>
#include <boost/predef/compiler/gcc.h>
#include <boost/predef/compiler/visualc.h>
-#include <utility>
-
namespace ndn {
//
diff --git a/ndn-cxx/util/logger.hpp b/ndn-cxx/util/logger.hpp
index abee117..cb1568d 100644
--- a/ndn-cxx/util/logger.hpp
+++ b/ndn-cxx/util/logger.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -22,7 +22,7 @@
#ifndef NDN_CXX_UTIL_LOGGER_HPP
#define NDN_CXX_UTIL_LOGGER_HPP
-#include "ndn-cxx/detail/common.hpp"
+#include "ndn-cxx/detail/config.hpp"
#ifdef HAVE_NDN_CXX_CUSTOM_LOGGER
#include "ndn-cxx/util/custom-logger.hpp"
@@ -33,6 +33,9 @@
#include <boost/log/sources/severity_logger.hpp>
#include <atomic>
+#include <iosfwd>
+#include <string>
+#include <string_view>
namespace ndn::util {
diff --git a/ndn-cxx/util/random.cpp b/ndn-cxx/util/random.cpp
index 529fc69..bc818a9 100644
--- a/ndn-cxx/util/random.cpp
+++ b/ndn-cxx/util/random.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -20,6 +20,7 @@
*/
#include "ndn-cxx/util/random.hpp"
+#include "ndn-cxx/util/exception.hpp"
#include <openssl/err.h>
#include <openssl/rand.h>
@@ -47,7 +48,7 @@
{
if (RAND_bytes(buf.data(), buf.size()) != 1) {
NDN_THROW(std::runtime_error("Failed to generate random bytes (error code " +
- to_string(ERR_get_error()) + ")"));
+ std::to_string(ERR_get_error()) + ")"));
}
}
diff --git a/ndn-cxx/util/random.hpp b/ndn-cxx/util/random.hpp
index cf03cc3..f8261b7 100644
--- a/ndn-cxx/util/random.hpp
+++ b/ndn-cxx/util/random.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -22,15 +22,15 @@
#ifndef NDN_CXX_UTIL_RANDOM_HPP
#define NDN_CXX_UTIL_RANDOM_HPP
-#include "ndn-cxx/detail/common.hpp"
#include "ndn-cxx/util/span.hpp"
+#include <cstdint>
#include <random>
namespace ndn::random {
/**
- * @brief Generate a cryptographically secure random integer from the range [0, 2^32)
+ * @brief Generate a cryptographically secure random integer in the range `[0, 2^32)`.
*
* @throw std::runtime_error if generation fails.
*/
@@ -38,7 +38,7 @@
generateSecureWord32();
/**
- * @brief Generate a cryptographically secure random integer from the range [0, 2^64)
+ * @brief Generate a cryptographically secure random integer in the range `[0, 2^64)`.
*
* @throw std::runtime_error if generation fails.
*/
@@ -46,7 +46,7 @@
generateSecureWord64();
/**
- * @brief Fill @p buffer with cryptographically secure random bytes
+ * @brief Fill @p buffer with cryptographically secure random bytes.
*
* @throw std::runtime_error if generation fails.
*/
@@ -56,7 +56,7 @@
using RandomNumberEngine = std::mt19937;
/**
- * @brief Returns a reference to a thread-local instance of a properly seeded PRNG
+ * @brief Returns a reference to a thread-local instance of a properly seeded PRNG.
*
* @warning The returned RandomNumberEngine MUST NOT be used when cryptographically secure
* random numbers are needed.
@@ -65,21 +65,21 @@
getRandomNumberEngine();
/**
- * @brief Generate a non-cryptographically-secure random integer in the range [0, 2^32)
+ * @brief Generate a non-cryptographically-secure random integer in the range `[0, 2^32)`.
*
- * This version is faster than generateSecureWord32, but it must not be used when
+ * This version is faster than generateSecureWord32(), but it must not be used when
* cryptographically secure random integers are needed (e.g., when creating signing or
- * encryption keys)
+ * encryption keys).
*/
uint32_t
generateWord32();
/**
- * @brief Generate a non-cryptographically-secure random integer in the range [0, 2^64)
+ * @brief Generate a non-cryptographically-secure random integer in the range `[0, 2^64)`.
*
- * This version is faster than generateSecureWord64, but it must not be used when
+ * This version is faster than generateSecureWord64(), but it must not be used when
* cryptographically secure random integers are needed (e.g., when creating signing or
- * encryption keys)
+ * encryption keys).
*/
uint64_t
generateWord64();
diff --git a/ndn-cxx/util/rtt-estimator.cpp b/ndn-cxx/util/rtt-estimator.cpp
index 3fb2cb5..dadcd28 100644
--- a/ndn-cxx/util/rtt-estimator.cpp
+++ b/ndn-cxx/util/rtt-estimator.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (C) 2016-2023, Arizona Board of Regents.
+ * Copyright (C) 2016-2024, Arizona Board of Regents.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -28,8 +28,8 @@
namespace ndn::util {
-RttEstimator::RttEstimator(shared_ptr<const Options> options)
- : m_options(options ? std::move(options) : make_shared<const Options>())
+RttEstimator::RttEstimator(std::shared_ptr<const Options> options)
+ : m_options(options ? std::move(options) : std::make_shared<const Options>())
, m_rto(m_options->initialRto)
{
BOOST_ASSERT(m_options->alpha >= 0 && m_options->alpha <= 1);
diff --git a/ndn-cxx/util/rtt-estimator.hpp b/ndn-cxx/util/rtt-estimator.hpp
index 355a314..ab3a6f9 100644
--- a/ndn-cxx/util/rtt-estimator.hpp
+++ b/ndn-cxx/util/rtt-estimator.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (C) 2016-2023, Arizona Board of Regents.
+ * Copyright (C) 2016-2024, Arizona Board of Regents.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -29,6 +29,8 @@
#include "ndn-cxx/util/time.hpp"
+#include <memory>
+
namespace ndn::util {
/**
@@ -56,7 +58,7 @@
* @param options options for the estimator; if nullptr, a default set of options is used
*/
explicit
- RttEstimator(shared_ptr<const Options> options = nullptr);
+ RttEstimator(std::shared_ptr<const Options> options = nullptr);
/**
* @brief Records a new RTT measurement.
@@ -111,7 +113,7 @@
backoffRto();
protected:
- shared_ptr<const Options> m_options;
+ std::shared_ptr<const Options> m_options;
private:
time::nanoseconds m_sRtt{-1}; ///< smoothed round-trip time
diff --git a/ndn-cxx/util/scheduler.hpp b/ndn-cxx/util/scheduler.hpp
index bdf598d..f83e62a 100644
--- a/ndn-cxx/util/scheduler.hpp
+++ b/ndn-cxx/util/scheduler.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -24,6 +24,7 @@
#include "ndn-cxx/detail/asio-fwd.hpp"
#include "ndn-cxx/detail/cancel-handle.hpp"
+#include "ndn-cxx/detail/common.hpp"
#include "ndn-cxx/util/time.hpp"
#include <boost/operators.hpp>
@@ -141,13 +142,15 @@
~Scheduler();
- /** \brief Schedule a one-time event after the specified delay
- * \return EventId that can be used to cancel the scheduled event
+ /**
+ * \brief Schedule a one-time event after the specified delay.
+ * \return EventId that can be used to cancel the scheduled event.
*/
EventId
schedule(time::nanoseconds after, EventCallback callback);
- /** \brief Cancel all scheduled events
+ /**
+ * \brief Cancel all scheduled events.
*/
void
cancelAllEvents();
diff --git a/ndn-cxx/util/string-helper.hpp b/ndn-cxx/util/string-helper.hpp
index 410b83f..4c73cbe 100644
--- a/ndn-cxx/util/string-helper.hpp
+++ b/ndn-cxx/util/string-helper.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -25,6 +25,11 @@
#include "ndn-cxx/encoding/buffer.hpp"
#include "ndn-cxx/util/span.hpp"
+#include <ostream>
+#include <stdexcept>
+#include <string>
+#include <string_view>
+
namespace ndn {
class StringHelperError : public std::invalid_argument
@@ -108,7 +113,7 @@
* without any whitespace separators (e.g., "48656C6C6F2C20776F726C6421")
* @throw StringHelperError Input string is invalid
*/
-shared_ptr<Buffer>
+std::shared_ptr<Buffer>
fromHex(std::string_view hexString);
/**
diff --git a/ndn-cxx/util/time-custom-clock.hpp b/ndn-cxx/util/time-custom-clock.hpp
index db1e977..a566087 100644
--- a/ndn-cxx/util/time-custom-clock.hpp
+++ b/ndn-cxx/util/time-custom-clock.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -24,10 +24,12 @@
#include "ndn-cxx/util/time.hpp"
+#include <memory>
+
namespace ndn::time {
/**
- * \brief Class implementing custom system or steady clock behavior
+ * \brief Class implementing custom system or steady clock behavior.
*
* Instance of specialization of this class may be passed to setCustomClocks() free function
* in order to change global behavior of system or steady clock.
@@ -53,14 +55,14 @@
using CustomSteadyClock = CustomClock<steady_clock>;
/**
- * \brief Set custom system and steady clocks
+ * \brief Set custom system and steady clocks.
*
* When \p steadyClock or \p systemClock set to nullptr, the default implementation
* of the corresponding clock will be used
*/
void
-setCustomClocks(shared_ptr<CustomSteadyClock> steadyClock = nullptr,
- shared_ptr<CustomSystemClock> systemClock = nullptr);
+setCustomClocks(std::shared_ptr<CustomSteadyClock> steadyClock = nullptr,
+ std::shared_ptr<CustomSystemClock> systemClock = nullptr);
} // namespace ndn::time
diff --git a/ndn-cxx/util/time-unit-test-clock.hpp b/ndn-cxx/util/time-unit-test-clock.hpp
index 2302677..23f43de 100644
--- a/ndn-cxx/util/time-unit-test-clock.hpp
+++ b/ndn-cxx/util/time-unit-test-clock.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -27,7 +27,7 @@
namespace ndn::time {
/**
- * @brief Traits for UnitTestClock, defining default behavior for different clocks
+ * @brief Traits for UnitTestClock, defining default behavior for different clocks.
*
* The only behavior that is currently controlled by the traits is default start
* time. The generic implementation assumes start time to be zero.
@@ -39,12 +39,12 @@
static nanoseconds
getDefaultStartTime()
{
- return nanoseconds::zero();
+ return 0_ns;
}
};
/**
- * @brief Specialization of UnitTestClockTraits for system_clock
+ * @brief Specialization of UnitTestClockTraits for system_clock.
*
* This specialization sets the default start time to 1415684132 seconds
* (equivalent to Tue 11 Nov 2014 05:35:32 UTC, if Unix epoch is assumed).
@@ -56,17 +56,17 @@
static nanoseconds
getDefaultStartTime()
{
- return seconds(1415684132);
+ return 1415684132_s;
}
};
/**
- * @brief Clock that can be used in unit tests for time-dependent tests independent of wall clock
+ * @brief Clock that can be used in unit tests for time-dependent tests independent of wall clock.
*
* This clock should be explicitly advanced with UnitTestClock<BaseClock>::advance() or set
* with UnitTestClock<BaseClock>::setNow() methods.
*
- * @note Default start time is determined by UnitTestClockTraits
+ * @note Default start time is determined by UnitTestClockTraits.
*/
template<class BaseClock, class ClockTraits = UnitTestClockTraits<BaseClock>>
class UnitTestClock : public CustomClock<BaseClock>
diff --git a/ndn-cxx/util/time.cpp b/ndn-cxx/util/time.cpp
index 8ad9310..adb60e1 100644
--- a/ndn-cxx/util/time.cpp
+++ b/ndn-cxx/util/time.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -27,13 +27,13 @@
namespace ndn::time {
-static shared_ptr<CustomSystemClock> g_systemClock;
-static shared_ptr<CustomSteadyClock> g_steadyClock;
+static std::shared_ptr<CustomSystemClock> g_systemClock;
+static std::shared_ptr<CustomSteadyClock> g_steadyClock;
// this function is declared in time-custom-clock.hpp
void
-setCustomClocks(shared_ptr<CustomSteadyClock> steadyClock,
- shared_ptr<CustomSystemClock> systemClock)
+setCustomClocks(std::shared_ptr<CustomSteadyClock> steadyClock,
+ std::shared_ptr<CustomSystemClock> systemClock)
{
g_systemClock = std::move(systemClock);
g_steadyClock = std::move(steadyClock);
diff --git a/ndn-cxx/util/time.hpp b/ndn-cxx/util/time.hpp
index 373bc36..01c5b88 100644
--- a/ndn-cxx/util/time.hpp
+++ b/ndn-cxx/util/time.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -22,12 +22,14 @@
#ifndef NDN_CXX_UTIL_TIME_HPP
#define NDN_CXX_UTIL_TIME_HPP
-#include "ndn-cxx/detail/common.hpp"
-
#include <boost/asio/wait_traits.hpp>
#include <boost/chrono.hpp>
+#include <cstdint>
#include <limits>
+#include <locale>
+#include <string>
+#include <type_traits>
namespace ndn {
namespace time {
diff --git a/tests/unit/clock-fixture.cpp b/tests/unit/clock-fixture.cpp
index 0efe19c..07afd85 100644
--- a/tests/unit/clock-fixture.cpp
+++ b/tests/unit/clock-fixture.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -24,8 +24,8 @@
namespace ndn::tests {
ClockFixture::ClockFixture()
- : m_steadyClock(make_shared<time::UnitTestSteadyClock>())
- , m_systemClock(make_shared<time::UnitTestSystemClock>())
+ : m_steadyClock(std::make_shared<time::UnitTestSteadyClock>())
+ , m_systemClock(std::make_shared<time::UnitTestSystemClock>())
{
time::setCustomClocks(m_steadyClock, m_systemClock);
}
diff --git a/tests/unit/clock-fixture.hpp b/tests/unit/clock-fixture.hpp
index a0309ae..d4a2c96 100644
--- a/tests/unit/clock-fixture.hpp
+++ b/tests/unit/clock-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -74,8 +74,8 @@
}
protected:
- shared_ptr<time::UnitTestSteadyClock> m_steadyClock;
- shared_ptr<time::UnitTestSystemClock> m_systemClock;
+ std::shared_ptr<time::UnitTestSteadyClock> m_steadyClock;
+ std::shared_ptr<time::UnitTestSystemClock> m_systemClock;
};
} // namespace ndn::tests
diff --git a/tests/unit/detail/cancel-handle.t.cpp b/tests/unit/detail/cancel-handle.t.cpp
index e35fe55..173811c 100644
--- a/tests/unit/detail/cancel-handle.t.cpp
+++ b/tests/unit/detail/cancel-handle.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -106,10 +106,10 @@
BOOST_AUTO_TEST_CASE(MoveConstruct)
{
int nCancels = 0;
- unique_ptr<ScopedTestHandle> hdl1;
+ std::unique_ptr<ScopedTestHandle> hdl1;
{
ScopedTestHandle hdl2 = makeDummyCancelHandle(nCancels);
- hdl1 = make_unique<ScopedTestHandle>(std::move(hdl2));
+ hdl1 = std::make_unique<ScopedTestHandle>(std::move(hdl2));
} // hdl2 goes out of scope
BOOST_CHECK_EQUAL(nCancels, 0);
hdl1.reset();
diff --git a/tests/unit/encoding/buffer-stream.t.cpp b/tests/unit/encoding/buffer-stream.t.cpp
index 7442299..e505c3d 100644
--- a/tests/unit/encoding/buffer-stream.t.cpp
+++ b/tests/unit/encoding/buffer-stream.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -32,7 +32,7 @@
{
OBufferStream os;
- shared_ptr<Buffer> buf = os.buf();
+ std::shared_ptr<Buffer> buf = os.buf();
BOOST_CHECK_EQUAL(buf->size(), 0);
}
@@ -42,7 +42,7 @@
os.put(0x33);
os.put(0x44);
- shared_ptr<Buffer> buf = os.buf();
+ std::shared_ptr<Buffer> buf = os.buf();
BOOST_REQUIRE_EQUAL(buf->size(), 2);
BOOST_CHECK_EQUAL(buf->at(0), 0x33);
BOOST_CHECK_EQUAL(buf->at(1), 0x44);
@@ -53,7 +53,7 @@
OBufferStream os;
os.write("\x11\x22", 2);
- shared_ptr<Buffer> buf = os.buf();
+ std::shared_ptr<Buffer> buf = os.buf();
BOOST_REQUIRE_EQUAL(buf->size(), 2);
BOOST_CHECK_EQUAL(buf->at(0), 0x11);
BOOST_CHECK_EQUAL(buf->at(1), 0x22);
@@ -61,7 +61,7 @@
BOOST_AUTO_TEST_CASE(Destructor) // Bug 3727
{
- auto os = make_unique<OBufferStream>();
+ auto os = std::make_unique<OBufferStream>();
auto buf = os->buf();
*os << 'x';
// do NOT flush or call buf() here
diff --git a/tests/unit/net/dns.t.cpp b/tests/unit/net/dns.t.cpp
index 17c5438..c1e8679 100644
--- a/tests/unit/net/dns.t.cpp
+++ b/tests/unit/net/dns.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 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).
*
@@ -20,6 +20,7 @@
*/
#include "ndn-cxx/net/dns.hpp"
+#include "ndn-cxx/detail/common.hpp"
#include "tests/boost-test.hpp"
#include "tests/unit/net/network-configuration-detector.hpp"
diff --git a/tests/unit/util/rtt-estimator.t.cpp b/tests/unit/util/rtt-estimator.t.cpp
index 7070fb0..0d3877e 100644
--- a/tests/unit/util/rtt-estimator.t.cpp
+++ b/tests/unit/util/rtt-estimator.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2023, Regents of the University of California,
+ * Copyright (c) 2016-2024, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -58,7 +58,7 @@
BOOST_AUTO_TEST_CASE(EstimatedRto)
{
- auto opts = make_shared<RttEstimator::Options>();
+ auto opts = std::make_shared<RttEstimator::Options>();
opts->initialRto = 400_ms;
opts->maxRto = 2_s;
RttEstimator rttEstimator(opts);
@@ -112,7 +112,7 @@
BOOST_AUTO_TEST_CASE(BackoffRto)
{
- auto opts = make_shared<RttEstimator::Options>();
+ auto opts = std::make_shared<RttEstimator::Options>();
opts->initialRto = 500_ms;
opts->maxRto = 4_s;
RttEstimator rttEstimator(opts);