mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
Upgrade to C++20 (#4239)
* Use explicit this capture required by C++20 * Use C++20 span * Replace wpi::numbers with std::numbers * Fix C++20 clang-tidy warning false positive in fmt * Remove ciso646 include since C++20 removed that header * Fix global-buffer-overflow asan warnings in ntcore tests * Add DIOSetProxy constructor to HAL * Upgrade MSVC compiler to 2022 * Bump native-utils to 2023.2.7 (changes to std=c++20) Co-authored-by: Peter Johnson <johnson.peter@gmail.com>
This commit is contained in:
@@ -6,12 +6,11 @@
|
||||
#define WPIUTIL_WPI_BASE64_H_
|
||||
|
||||
#include <cstddef>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include "wpi/span.h"
|
||||
|
||||
namespace wpi {
|
||||
template <typename T>
|
||||
class SmallVectorImpl;
|
||||
@@ -26,8 +25,8 @@ std::string_view Base64Decode(std::string_view encoded, size_t* num_read,
|
||||
|
||||
size_t Base64Decode(std::string_view encoded, std::vector<uint8_t>* plain);
|
||||
|
||||
span<uint8_t> Base64Decode(std::string_view encoded, size_t* num_read,
|
||||
SmallVectorImpl<uint8_t>& buf);
|
||||
std::span<uint8_t> Base64Decode(std::string_view encoded, size_t* num_read,
|
||||
SmallVectorImpl<uint8_t>& buf);
|
||||
|
||||
void Base64Encode(raw_ostream& os, std::string_view plain);
|
||||
|
||||
@@ -36,11 +35,11 @@ void Base64Encode(std::string_view plain, std::string* encoded);
|
||||
std::string_view Base64Encode(std::string_view plain,
|
||||
SmallVectorImpl<char>& buf);
|
||||
|
||||
void Base64Encode(raw_ostream& os, span<const uint8_t> plain);
|
||||
void Base64Encode(raw_ostream& os, std::span<const uint8_t> plain);
|
||||
|
||||
void Base64Encode(span<const uint8_t> plain, std::string* encoded);
|
||||
void Base64Encode(std::span<const uint8_t> plain, std::string* encoded);
|
||||
|
||||
std::string_view Base64Encode(span<const uint8_t> plain,
|
||||
std::string_view Base64Encode(std::span<const uint8_t> plain,
|
||||
SmallVectorImpl<char>& buf);
|
||||
|
||||
} // namespace wpi
|
||||
|
||||
Reference in New Issue
Block a user