From 20167fdce3e9412440131632ed06b84db0a976b5 Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 10 Jan 2020 17:15:23 +0100 Subject: [PATCH] Replace if constexpr with preprocessor if. --- src/curl_wrapper.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/curl_wrapper.cpp b/src/curl_wrapper.cpp index 0c9a3f6..97894e0 100644 --- a/src/curl_wrapper.cpp +++ b/src/curl_wrapper.cpp @@ -183,16 +183,17 @@ void CURLWrapper::set_access_token(const string_view access_token) _curl_buffer_error}; } - if constexpr (LIBCURL_VERSION_NUM >= 0x073d00) // libcurl >= 7.61.0. + #if LIBCURL_VERSION_NUM >= 0x073d00 // libcurl >= 7.61.0. { //NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-signed-bitwise) code = curl_easy_setopt(_connection, CURLOPT_HTTPAUTH, CURLAUTH_BEARER); } - else + #else { //NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-signed-bitwise) code = curl_easy_setopt(_connection, CURLOPT_HTTPAUTH, CURLAUTH_ANY); } + #endif if (code != CURLE_OK) { throw CURLException{code, "Could not set authorization token.",