Skip to content

Commit b1f2e45

Browse files
committed
Merge pull request #937 from libcpr/fix/clang-windows-warnings
Fix/clang windows warnings #927
1 parent b064252 commit b1f2e45

24 files changed

+73
-70
lines changed

CMakeLists.txt

+8
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,14 @@ if(CPR_BUILD_TESTS)
326326
restore_variable(DESTINATION CMAKE_CXX_CLANG_TIDY BACKUP CMAKE_CXX_CLANG_TIDY_BKP)
327327
endif()
328328

329+
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
330+
else()
331+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Werror")
332+
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
333+
# Disable C++98 compatibility support in clang: https://github.com/libcpr/cpr/issues/927
334+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-nonportable-system-include-path -Wno-exit-time-destructors -Wno-undef -Wno-global-constructors -Wno-switch-enum -Wno-old-style-cast -Wno-covered-switch-default -Wno-undefined-func-template")
335+
endif()
336+
endif()
329337

330338
add_subdirectory(cpr)
331339
add_subdirectory(include)

cpr/curl_container.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const std::string CurlContainer<Parameter>::GetContent(const CurlHolder& holder)
3333
content += escapedKey + "=";
3434
content += escapedValue;
3535
}
36-
};
36+
}
3737

3838
return content;
3939
}

cpr/interceptor.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Response Interceptor::proceed(Session& session, ProceedHttpMethod httpMethod) {
2525
case ProceedHttpMethod::PUT_REQUEST:
2626
return session.Put();
2727
default:
28-
throw std::invalid_argument{"Can't procceed the session with the provided http method!"};
28+
throw std::invalid_argument{"Can't proceed the session with the provided http method!"};
2929
}
3030
}
3131

@@ -43,4 +43,4 @@ Response Interceptor::proceed(Session& session, ProceedHttpMethod httpMethod, co
4343
throw std::invalid_argument{"WriteCallback argument is only valid for ProceedHttpMethod::DOWNLOAD_CALLBACK!"};
4444
}
4545

46-
} // namespace cpr
46+
} // namespace cpr

cpr/parameters.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
#include "cpr/parameters.h"
22

3-
#include <initializer_list>
4-
#include <string>
5-
6-
#include "cpr/util.h"
7-
83
namespace cpr {
9-
Parameters::Parameters(const std::initializer_list<Parameter>& parameters) : CurlContainer<Parameter>(parameters) {}
104
} // namespace cpr

cpr/payload.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
#include "cpr/payload.h"
22

3-
#include <initializer_list>
4-
#include <string>
5-
6-
#include "cpr/util.h"
7-
83
namespace cpr {
9-
Payload::Payload(const std::initializer_list<Pair>& pairs) : CurlContainer<Pair>(pairs) {}
104
} // namespace cpr

cpr/response.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Response::Response(std::shared_ptr<CurlHolder> curl, std::string&& p_text, std::
1111
char* url_string{nullptr};
1212
curl_easy_getinfo(curl_->handle, CURLINFO_EFFECTIVE_URL, &url_string);
1313
url = Url(url_string);
14-
#if LIBCURL_VERSION_NUM >= 0x073700
14+
#if LIBCURL_VERSION_NUM >= 0x073700 // 7.55.0
1515
curl_easy_getinfo(curl_->handle, CURLINFO_SIZE_DOWNLOAD_T, &downloaded_bytes);
1616
curl_easy_getinfo(curl_->handle, CURLINFO_SIZE_UPLOAD_T, &uploaded_bytes);
1717
#else

cpr/session.cpp

+7-8
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Session::Session() : curl_(new CurlHolder()) {
8181
curl_easy_setopt(curl_->handle, CURLOPT_NOSIGNAL, 1L);
8282
#endif
8383

84-
#if LIBCURL_VERSION_NUM >= 0x071900
84+
#if LIBCURL_VERSION_NUM >= 0x071900 // 7.25.0
8585
curl_easy_setopt(curl_->handle, CURLOPT_TCP_KEEPALIVE, 1L);
8686
#endif
8787
}
@@ -166,7 +166,7 @@ void Session::prepareCommon() {
166166
}
167167
}
168168

169-
#if LIBCURL_VERSION_NUM >= 0x072100
169+
#if LIBCURL_VERSION_NUM >= 0x071506 // 7.21.6
170170
if (acceptEncoding_.empty()) {
171171
/* enable all supported built-in compressions */
172172
curl_easy_setopt(curl_->handle, CURLOPT_ACCEPT_ENCODING, "");
@@ -175,7 +175,7 @@ void Session::prepareCommon() {
175175
}
176176
#endif
177177

178-
#if LIBCURL_VERSION_NUM >= 0x077100
178+
#if LIBCURL_VERSION_NUM >= 0x071900 // 7.25.0
179179
#if SUPPORT_SSL_NO_REVOKE
180180
// NOLINTNEXTLINE (google-runtime-int)
181181
long bitmask{0};
@@ -254,7 +254,7 @@ void Session::SetWriteCallback(const WriteCallback& write) {
254254

255255
void Session::SetProgressCallback(const ProgressCallback& progress) {
256256
progresscb_ = progress;
257-
#if LIBCURL_VERSION_NUM < 0x072000
257+
#if LIBCURL_VERSION_NUM < 0x072000 // 7.32.0
258258
curl_easy_setopt(curl_->handle, CURLOPT_PROGRESSFUNCTION, cpr::util::progressUserFunction);
259259
curl_easy_setopt(curl_->handle, CURLOPT_PROGRESSDATA, &progresscb_);
260260
#else
@@ -491,7 +491,7 @@ void Session::SetSslOptions(const SslOptions& options) {
491491
#endif
492492
curl_easy_setopt(curl_->handle, CURLOPT_SSL_VERIFYPEER, options.verify_peer ? ON : OFF);
493493
curl_easy_setopt(curl_->handle, CURLOPT_SSL_VERIFYHOST, options.verify_host ? 2L : 0L);
494-
#if LIBCURL_VERSION_NUM >= 0x072900
494+
#if LIBCURL_VERSION_NUM >= 0x072900 // 7.41.0
495495
curl_easy_setopt(curl_->handle, CURLOPT_SSL_VERIFYSTATUS, options.verify_status ? ON : OFF);
496496
#endif
497497

@@ -551,11 +551,11 @@ void Session::SetInterface(const Interface& iface) {
551551
}
552552

553553
void Session::SetLocalPort(const LocalPort& local_port) {
554-
curl_easy_setopt(curl_->handle, CURLOPT_LOCALPORT, local_port);
554+
curl_easy_setopt(curl_->handle, CURLOPT_LOCALPORT, static_cast<long>(static_cast<uint16_t>(local_port)));
555555
}
556556

557557
void Session::SetLocalPortRange(const LocalPortRange& local_port_range) {
558-
curl_easy_setopt(curl_->handle, CURLOPT_LOCALPORTRANGE, local_port_range);
558+
curl_easy_setopt(curl_->handle, CURLOPT_LOCALPORTRANGE, static_cast<long>(static_cast<uint16_t>(local_port_range)));
559559
}
560560

561561
void Session::SetHttpVersion(const HttpVersion& version) {
@@ -598,7 +598,6 @@ void Session::SetHttpVersion(const HttpVersion& version) {
598598

599599
default: // Should not happen
600600
throw std::invalid_argument("Invalid/Unknown HTTP version type.");
601-
break;
602601
}
603602
}
604603

cpr/ssl_ctx.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ CURLcode sslctx_function_load_ca_cert_from_buffer(CURL* /*curl*/, void* sslctx,
6767

6868
#endif // OPENSSL_BACKEND_USED
6969

70-
#endif // SUPPORT_CURLOPT_SSL_CTX_FUNCTION
70+
#endif // SUPPORT_CURLOPT_SSL_CTX_FUNCTION

cpr/util.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,19 @@
1515
#if defined(_Win32)
1616
#include <Windows.h>
1717
#else
18+
#ifdef __clang__
19+
#pragma clang diagnostic push
20+
#if __has_warning("-Wreserved-macro-identifier") // Not all versions of clang support this flag like the one used on Ubuntu 18.04
21+
#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
22+
#endif
23+
#pragma clang diagnostic ignored "-Wunused-macros"
24+
#endif
1825
// https://en.cppreference.com/w/c/string/byte/memset
1926
// NOLINTNEXTLINE(bugprone-reserved-identifier, cert-dcl37-c, cert-dcl51-cpp, cppcoreguidelines-macro-usage)
2027
#define __STDC_WANT_LIB_EXT1__ 1
28+
#ifdef __clang__
29+
#pragma clang diagnostic pop
30+
#endif
2131
#include <cstring>
2232
#endif
2333

include/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ target_include_directories(cpr PUBLIC
66
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/cpr_generated_includes/>)
77

88
target_sources(cpr PRIVATE
9-
109
# Header files (useful in IDEs)
1110
cpr/accept_encoding.h
1211
cpr/api.h

include/cpr/cert_info.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ class CertInfo {
1313

1414
public:
1515
CertInfo() = default;
16-
CertInfo(const std::initializer_list<std::string>& entry) : cert_info_{entry} {};
16+
CertInfo(const CertInfo& other) = default;
17+
CertInfo(CertInfo&& old) = default;
18+
CertInfo(const std::initializer_list<std::string>& entry) : cert_info_{entry} {}
1719
~CertInfo() noexcept = default;
1820

1921
using iterator = std::vector<std::string>::iterator;

include/cpr/cookies.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Cookie {
2323
* std::chrono::system_clock::time_point::min() won't work on Windows due to the min, max clash there.
2424
* So we fall back to std::chrono::system_clock::from_time_t(0) for the minimum value here.
2525
**/
26-
Cookie(const std::string& name, const std::string& value, const std::string& domain = "", bool p_isIncludingSubdomains = false, const std::string& path = "/", bool p_isHttpsOnly = false, std::chrono::system_clock::time_point expires = std::chrono::system_clock::from_time_t(0)) : name_{name}, value_{value}, domain_{domain}, includeSubdomains_{p_isIncludingSubdomains}, path_{path}, httpsOnly_{p_isHttpsOnly}, expires_{expires} {};
26+
Cookie(const std::string& name, const std::string& value, const std::string& domain = "", bool p_isIncludingSubdomains = false, const std::string& path = "/", bool p_isHttpsOnly = false, std::chrono::system_clock::time_point expires = std::chrono::system_clock::from_time_t(0)) : name_{name}, value_{value}, domain_{domain}, includeSubdomains_{p_isIncludingSubdomains}, path_{path}, httpsOnly_{p_isHttpsOnly}, expires_{expires} {}
2727
const std::string GetDomain() const;
2828
bool IsIncludingSubdomains() const;
2929
const std::string GetPath() const;
@@ -62,10 +62,10 @@ class Cookies {
6262
bool encode{true};
6363

6464
// NOLINTNEXTLINE(google-explicit-constructor, hicpp-explicit-conversions)
65-
Cookies(bool p_encode = true) : encode{p_encode} {};
66-
Cookies(const std::initializer_list<cpr::Cookie>& cookies, bool p_encode = true) : encode{p_encode}, cookies_{cookies} {};
65+
Cookies(bool p_encode = true) : encode{p_encode} {}
66+
Cookies(const std::initializer_list<cpr::Cookie>& cookies, bool p_encode = true) : encode{p_encode}, cookies_{cookies} {}
6767
// NOLINTNEXTLINE(google-explicit-constructor, hicpp-explicit-conversions)
68-
Cookies(const cpr::Cookie& cookie, bool p_encode = true) : encode{p_encode}, cookies_{cookie} {};
68+
Cookies(const cpr::Cookie& cookie, bool p_encode = true) : encode{p_encode}, cookies_{cookie} {}
6969

7070
cpr::Cookie& operator[](size_t pos);
7171
const std::string GetEncoded(const CurlHolder& holder) const;

include/cpr/interceptor.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ class Interceptor {
3333
} // namespace cpr
3434

3535

36-
#endif
36+
#endif

include/cpr/limit_rate.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ class LimitRate {
1515

1616
} // namespace cpr
1717

18-
#endif
18+
#endif

include/cpr/local_port.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ class LocalPort {
2020

2121
} // namespace cpr
2222

23-
#endif
23+
#endif

include/cpr/local_port_range.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ class LocalPortRange {
2020

2121
} // namespace cpr
2222

23-
#endif
23+
#endif

include/cpr/parameters.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace cpr {
1010
class Parameters : public CurlContainer<Parameter> {
1111
public:
1212
Parameters() = default;
13-
Parameters(const std::initializer_list<Parameter>& parameters);
13+
Parameters(const std::initializer_list<Parameter>& parameters) : CurlContainer<Parameter>(parameters) {}
1414
};
1515

1616
} // namespace cpr

include/cpr/payload.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Payload : public CurlContainer<Pair> {
1515
Add(*pair);
1616
}
1717
}
18-
Payload(const std::initializer_list<Pair>& pairs);
18+
Payload(const std::initializer_list<Pair>& pairs) : CurlContainer<Pair>(pairs) {}
1919
};
2020

2121
} // namespace cpr

include/cpr/redirect.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ class Redirect {
7272

7373
Redirect() = default;
7474
// NOLINTNEXTLINE (google-runtime-int)
75-
Redirect(long p_maximum, bool p_follow, bool p_cont_send_cred, PostRedirectFlags p_post_flags) : maximum(p_maximum), follow(p_follow), cont_send_cred(p_cont_send_cred), post_flags(p_post_flags){};
75+
Redirect(long p_maximum, bool p_follow, bool p_cont_send_cred, PostRedirectFlags p_post_flags) : maximum(p_maximum), follow(p_follow), cont_send_cred(p_cont_send_cred), post_flags(p_post_flags){}
7676
// NOLINTNEXTLINE (google-runtime-int)
77-
explicit Redirect(long p_maximum) : maximum(p_maximum){};
78-
explicit Redirect(bool p_follow) : follow(p_follow){};
79-
Redirect(bool p_follow, bool p_cont_send_cred) : follow(p_follow), cont_send_cred(p_cont_send_cred){};
80-
explicit Redirect(PostRedirectFlags p_post_flags) : post_flags(p_post_flags){};
77+
explicit Redirect(long p_maximum) : maximum(p_maximum){}
78+
explicit Redirect(bool p_follow) : follow(p_follow){}
79+
Redirect(bool p_follow, bool p_cont_send_cred) : follow(p_follow), cont_send_cred(p_cont_send_cred){}
80+
explicit Redirect(PostRedirectFlags p_post_flags) : post_flags(p_post_flags){}
8181
};
8282
} // namespace cpr
8383

include/cpr/ssl_ctx.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ CURLcode sslctx_function_load_ca_cert_from_buffer(CURL* curl, void* sslctx, void
2323

2424
#endif
2525

26-
#endif
26+
#endif

include/cpr/ssl_options.h

+20-23
Original file line numberDiff line numberDiff line change
@@ -10,63 +10,60 @@
1010
#include "cpr/util.h"
1111
#include <utility>
1212

13-
#define __LIBCURL_VERSION_GTE(major, minor) ((LIBCURL_VERSION_MAJOR > (major)) || ((LIBCURL_VERSION_MAJOR == (major)) && (LIBCURL_VERSION_MINOR >= (minor))))
14-
#define __LIBCURL_VERSION_LT(major, minor) ((LIBCURL_VERSION_MAJOR < (major)) || ((LIBCURL_VERSION_MAJOR == (major)) && (LIBCURL_VERSION_MINOR < (minor))))
15-
1613
#ifndef SUPPORT_ALPN
17-
#define SUPPORT_ALPN __LIBCURL_VERSION_GTE(7, 36)
14+
#define SUPPORT_ALPN LIBCURL_VERSION_NUM >= 0x072400 // 7.36.0
1815
#endif
1916
#ifndef SUPPORT_NPN
20-
#define SUPPORT_NPN __LIBCURL_VERSION_GTE(7, 36) && __LIBCURL_VERSION_LT(7, 86)
17+
#define SUPPORT_NPN LIBCURL_VERSION_NUM >= 0x072400 && LIBCURL_VERSION_NUM <= 0x078600 // 7.36.0 - 7.86.0
2118
#endif
2219

2320
#ifndef SUPPORT_SSLv2
24-
#define SUPPORT_SSLv2 __LIBCURL_VERSION_LT(7, 19)
21+
#define SUPPORT_SSLv2 LIBCURL_VERSION_NUM <= 0x071300 // 7.19.0
2522
#endif
2623
#ifndef SUPPORT_SSLv3
27-
#define SUPPORT_SSLv3 __LIBCURL_VERSION_LT(7, 39)
24+
#define SUPPORT_SSLv3 LIBCURL_VERSION_NUM <= 0x072700 // 7.39.0
2825
#endif
2926
#ifndef SUPPORT_TLSv1_0
30-
#define SUPPORT_TLSv1_0 __LIBCURL_VERSION_GTE(7, 34)
27+
#define SUPPORT_TLSv1_0 LIBCURL_VERSION_NUM >= 0x072200 // 7.34.0
3128
#endif
3229
#ifndef SUPPORT_TLSv1_1
33-
#define SUPPORT_TLSv1_1 __LIBCURL_VERSION_GTE(7, 34)
30+
#define SUPPORT_TLSv1_1 LIBCURL_VERSION_NUM >= 0x072200 // 7.34.0
3431
#endif
3532
#ifndef SUPPORT_TLSv1_2
36-
#define SUPPORT_TLSv1_2 __LIBCURL_VERSION_GTE(7, 34)
33+
#define SUPPORT_TLSv1_2 LIBCURL_VERSION_NUM >= 0x072200 // 7.34.0
3734
#endif
3835
#ifndef SUPPORT_TLSv1_3
39-
#define SUPPORT_TLSv1_3 __LIBCURL_VERSION_GTE(7, 52)
36+
#define SUPPORT_TLSv1_3 LIBCURL_VERSION_NUM >= 0x073400 // 7.52.0
4037
#endif
4138
#ifndef SUPPORT_MAX_TLS_VERSION
42-
#define SUPPORT_MAX_TLS_VERSION __LIBCURL_VERSION_GTE(7, 54)
39+
#define SUPPORT_MAX_TLS_VERSION LIBCURL_VERSION_NUM >= 0x073600 // 7.54.0
4340
#endif
4441
#ifndef SUPPORT_MAX_TLSv1_1
45-
#define SUPPORT_MAX_TLSv1_1 __LIBCURL_VERSION_GTE(7, 54)
42+
#define SUPPORT_MAX_TLSv1_1 LIBCURL_VERSION_NUM >= 0x073600 // 7.54.0
4643
#endif
4744
#ifndef SUPPORT_MAX_TLSv1_2
48-
#define SUPPORT_MAX_TLSv1_2 __LIBCURL_VERSION_GTE(7, 54)
45+
#define SUPPORT_MAX_TLSv1_2 LIBCURL_VERSION_NUM >= 0x073600 // 7.54.0
4946
#endif
5047
#ifndef SUPPORT_MAX_TLSv1_3
51-
#define SUPPORT_MAX_TLSv1_3 __LIBCURL_VERSION_GTE(7, 54)
48+
#define SUPPORT_MAX_TLSv1_3 LIBCURL_VERSION_NUM >= 0x073600 // 7.54.0
5249
#endif
5350
#ifndef SUPPORT_TLSv13_CIPHERS
54-
#define SUPPORT_TLSv13_CIPHERS __LIBCURL_VERSION_GTE(7, 61)
51+
#define SUPPORT_TLSv13_CIPHERS LIBCURL_VERSION_NUM >= 0x073D00 // 7.61.0
5552
#endif
5653
#ifndef SUPPORT_SESSIONID_CACHE
57-
#define SUPPORT_SESSIONID_CACHE __LIBCURL_VERSION_GTE(7, 16)
54+
#define SUPPORT_SESSIONID_CACHE LIBCURL_VERSION_NUM >= 0x071000 // 7.16.0
5855
#endif
5956
#ifndef SUPPORT_SSL_FALSESTART
60-
#define SUPPORT_SSL_FALSESTART __LIBCURL_VERSION_GTE(7, 42)
57+
#define SUPPORT_SSL_FALSESTART LIBCURL_VERSION_NUM >= 0x072A00 // 7.42.0
6158
#endif
6259
#ifndef SUPPORT_SSL_NO_REVOKE
63-
#define SUPPORT_SSL_NO_REVOKE __LIBCURL_VERSION_GTE(7, 44)
60+
#define SUPPORT_SSL_NO_REVOKE LIBCURL_VERSION_NUM >= 0x072C00 // 7.44.0
6461
#endif
6562
#ifndef SUPPORT_CURLOPT_SSLKEY_BLOB
66-
#define SUPPORT_CURLOPT_SSLKEY_BLOB __LIBCURL_VERSION_GTE(7, 71)
63+
#define SUPPORT_CURLOPT_SSLKEY_BLOB LIBCURL_VERSION_NUM >= 0x074700 // 7.71.0
6764
#endif
6865
#ifndef SUPPORT_CURLOPT_SSL_CTX_FUNCTION
69-
#define SUPPORT_CURLOPT_SSL_CTX_FUNCTION __LIBCURL_VERSION_GTE(7, 11)
66+
#define SUPPORT_CURLOPT_SSL_CTX_FUNCTION LIBCURL_VERSION_NUM >= 0x070B00 // 7.11.0
7067
#endif
7168

7269
namespace cpr {
@@ -108,7 +105,7 @@ class DerCert : public CertFile {
108105
// NOLINTNEXTLINE(google-explicit-constructor, hicpp-explicit-conversions)
109106
DerCert(std::string&& p_filename) : CertFile(std::move(p_filename)) {}
110107

111-
virtual ~DerCert() = default;
108+
~DerCert() override = default;
112109

113110
const char* GetCertType() const override {
114111
return "DER";
@@ -168,7 +165,7 @@ class DerKey : public KeyFile {
168165
template <typename FileType, typename PassType>
169166
DerKey(FileType&& p_filename, PassType p_password) : KeyFile(std::forward<FileType>(p_filename), std::move(p_password)) {}
170167

171-
virtual ~DerKey() = default;
168+
~DerKey() override = default;
172169

173170
const char* GetKeyType() const override {
174171
return "DER";

include/cpr/status_codes.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef _CPR_STATUS_CODES
2-
#define _CPR_STATUS_CODES
1+
#ifndef CPR_STATUS_CODES
2+
#define CPR_STATUS_CODES
33
#include <cstdint>
44
namespace cpr {
55
namespace status {

test/get_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ TEST(BasicAuthenticationTests, BasicAuthenticationSuccessTest) {
211211

212212
TEST(BasicAuthenticationTests, BasicBearerSuccessTest) {
213213
Url url{server->GetBaseUrl() + "/bearer_token.html"};
214-
#if CPR_LIBCURL_VERSION_NUM >= 0x073D00
214+
#if CPR_LIBCURL_VERSION_NUM >= 0x073D00 // 7.61.0
215215
Response response = cpr::Get(url, Bearer{"the_token"});
216216
#else
217217
Response response = cpr::Get(url, Header{{"Authorization", "Bearer the_token"}});

0 commit comments

Comments
 (0)