support C++20 with older boost

This commit is contained in:
orignal committed 2026-09-07 22:55:21 -04:00
1 parent 0995713eba
commit 4966e30938
12 files changed
+20 -8

No files matched your search

+1
View File
@@ -13,6 +13,7 @@
#include <memory>
#include <regex>
#include <utility> // for C++20 with boost < 1.81
#include <boost/asio.hpp>
#include <boost/algorithm/string.hpp>
+1
View File
@@ -20,6 +20,7 @@
#include <string>
#include <functional>
#include <future>
#include <utility> // for C++20 with boost < 1.81
#include <boost/asio.hpp>
#include "Identity.h"
#include "TunnelPool.h"
+1
View File
@@ -10,6 +10,7 @@
#include <fstream>
#include <vector>
#include <map>
#include <utility> // for C++20 with boost < 1.81
#include <boost/asio.hpp>
#include <stdexcept>
+1
View File
@@ -10,6 +10,7 @@
#include <random>
#include <fstream>
#include <sstream>
#include <utility> // for C++20 with boost < 1.81
#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
#include <boost/algorithm/string.hpp>
+1
View File
@@ -13,6 +13,7 @@
#include <string>
#include <memory>
#include <unordered_set>
#include <utility> // for C++20 with boost < 1.81
#include <boost/asio.hpp>
#include "Identity.h"
#include "RouterInfo.h"
+1
View File
@@ -18,6 +18,7 @@
#include <array>
#include <iostream>
#include <memory>
#include <utility> // for C++20 with boost < 1.81
#include <boost/asio.hpp>
#ifndef __cpp_lib_atomic_shared_ptr
#include <boost/shared_ptr.hpp>
+6 -5
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2024, The PurpleI2P Project
* Copyright (c) 2013-2026, The PurpleI2P Project
*
* This file is part of Purple i2pd project and licensed under BSD3
*
@@ -12,6 +12,7 @@
#include <string.h>
#include <chrono>
#include <future>
#include <utility> // for C++20 with boost < 1.81
#include <boost/asio.hpp>
#include <boost/algorithm/string.hpp>
#include "Config.h"
@@ -245,8 +246,8 @@ namespace util
{
return std::chrono::duration_cast<std::chrono::seconds>(
std::chrono::steady_clock::now().time_since_epoch()).count();
}
}
void GetCurrentDate (char * date)
{
GetDateString (GetSecondsSinceEpoch (), date);
@@ -255,8 +256,8 @@ namespace util
void GetNextDayDate (char * date)
{
GetDateString (GetSecondsSinceEpoch () + 24*60*60, date);
}
}
void GetDateString (uint64_t timestamp, char * date)
{
using clock = std::chrono::system_clock;
+4 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2025, The PurpleI2P Project
* Copyright (c) 2013-2026, The PurpleI2P Project
*
* This file is part of Purple i2pd project and licensed under BSD3
*
@@ -13,8 +13,9 @@
#include <thread>
#include <vector>
#include <string>
#include <utility> // for C++20 with boost < 1.81
#include <boost/asio.hpp>
#include <boost/asio/steady_timer.hpp> // for boost 1.89
#include <boost/asio/steady_timer.hpp> // for boost 1.89
namespace i2p
{
@@ -28,7 +29,7 @@ namespace util
uint64_t GetMonotonicMicroseconds ();
uint64_t GetMonotonicMilliseconds ();
uint64_t GetMonotonicSeconds ();
void GetCurrentDate (char * date); // returns UTC date as YYYYMMDD string, 9 bytes
void GetNextDayDate (char * date); // returns next UTC day as YYYYMMDD string, 9 bytes
void GetDateString (uint64_t timestamp, char * date); // timestamp is seconds since epoch, returns date as YYYYMMDD string, 9 bytes
+1
View File
@@ -22,6 +22,7 @@
#include <memory>
#include <atomic>
#include <random>
#include <utility> // for C++20 with boost < 1.81
#include <boost/asio.hpp>
#include "TransportSession.h"
#include "SSU2.h"
+1
View File
@@ -10,6 +10,7 @@
#include <string>
#include <array>
#include <unordered_set>
#include <utility> // for C++20 with boost < 1.81
#include <boost/asio.hpp>
#include "util.h"
+1
View File
@@ -14,6 +14,7 @@
#include <atomic>
#include <memory>
#include <set>
#include <utility> // for C++20 with boost < 1.81
#include <boost/asio.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/predicate.hpp>
+1
View File
@@ -14,6 +14,7 @@
#include <map>
#include <string>
#include <string_view>
#include <utility> // for C++20 with boost < 1.81
#include <boost/asio.hpp>
#include <mutex>
#include "I2PService.h"