Skip to content

Commit 66e50f0

Browse files
committed
Fix compiler errors and mint v2.10.6
1 parent f9f518e commit 66e50f0

File tree

9 files changed

+19
-17
lines changed

9 files changed

+19
-17
lines changed

Build/version.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<CppRestBaseFileName>cpprest</CppRestBaseFileName>
55
<CppRestSDKVersionMajor>2</CppRestSDKVersionMajor>
66
<CppRestSDKVersionMinor>10</CppRestSDKVersionMinor>
7-
<CppRestSDKVersionRevision>4</CppRestSDKVersionRevision>
7+
<CppRestSDKVersionRevision>6</CppRestSDKVersionRevision>
88
<CppRestSDKVersionFileSuffix>$(CppRestSDKVersionMajor)_$(CppRestSDKVersionMinor)</CppRestSDKVersionFileSuffix>
99
<CppRestSDKVersionString>$(CppRestSDKVersionMajor).$(CppRestSDKVersionMinor)</CppRestSDKVersionString>
1010
</PropertyGroup>

Release/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ endif()
1111

1212
set(CPPREST_VERSION_MAJOR 2)
1313
set(CPPREST_VERSION_MINOR 10)
14-
set(CPPREST_VERSION_REVISION 4)
14+
set(CPPREST_VERSION_REVISION 6)
1515

1616
enable_testing()
1717

Release/include/cpprest/asyncrt_utils.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -359,13 +359,7 @@ namespace details
359359
inline bool __cdecl is_alnum(const unsigned char uch) CPPREST_NOEXCEPT
360360
{ // test if uch is an alnum character
361361
// special casing char to avoid branches
362-
static
363-
#if !defined(_MSC_VER) || _MSC_VER >= 1900
364-
constexpr
365-
#else
366-
const
367-
#endif
368-
bool is_alnum_table[UCHAR_MAX + 1] =
362+
static CPPREST_CONSTEXPR bool is_alnum_table[UCHAR_MAX + 1] =
369363
{
370364
/* X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 XA XB XC XD XE XF */
371365
/* 0X */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

Release/include/cpprest/details/cpprest_compat.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818

1919
#if _MSC_VER >= 1900
2020
#define CPPREST_NOEXCEPT noexcept
21+
#define CPPREST_CONSTEXPR constexpr
2122
#else
2223
#define CPPREST_NOEXCEPT
24+
#define CPPREST_CONSTEXPR const
2325
#endif
2426

2527
#define CASABLANCA_UNREFERENCED_PARAMETER(x) (x)
@@ -36,6 +38,7 @@
3638
#define __assume(x) do { if (!(x)) __builtin_unreachable(); } while (false)
3739
#define CASABLANCA_UNREFERENCED_PARAMETER(x) (void)x
3840
#define CPPREST_NOEXCEPT noexcept
41+
#define CPPREST_CONSTEXPR constexpr
3942

4043
#include <assert.h>
4144
#define _ASSERTE(x) assert(x)

Release/include/cpprest/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
44
*
55
*/
6-
#define CPPREST_VERSION_REVISION 5
6+
#define CPPREST_VERSION_REVISION 6
77
#define CPPREST_VERSION_MINOR 10
88
#define CPPREST_VERSION_MAJOR 2
99

Release/src/http/client/http_client_winhttp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct security_failure_message
3333
const char * text;
3434
};
3535

36-
constexpr security_failure_message g_security_failure_messages[] = {
36+
CPPREST_CONSTEXPR security_failure_message g_security_failure_messages[] = {
3737
{ WINHTTP_CALLBACK_STATUS_FLAG_CERT_REV_FAILED,
3838
"WINHTTP_CALLBACK_STATUS_FLAG_CERT_REV_FAILED failed to check revocation status."},
3939
{ WINHTTP_CALLBACK_STATUS_FLAG_INVALID_CERT,

Release/src/http/common/x509_cert_utilities.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace details
2727
struct winhttp_cert_context
2828
{
2929
PCCERT_CONTEXT raw;
30-
winhttp_cert_context() noexcept : raw(nullptr) {}
30+
winhttp_cert_context() CPPREST_NOEXCEPT : raw(nullptr) {}
3131
winhttp_cert_context(const winhttp_cert_context&) = delete;
3232
winhttp_cert_context& operator=(const winhttp_cert_context&) = delete;
3333
~winhttp_cert_context()
@@ -44,7 +44,7 @@ struct winhttp_cert_context
4444
struct winhttp_cert_chain_context
4545
{
4646
PCCERT_CHAIN_CONTEXT raw;
47-
winhttp_cert_chain_context() noexcept : raw(nullptr) {}
47+
winhttp_cert_chain_context() CPPREST_NOEXCEPT : raw(nullptr) {}
4848
winhttp_cert_chain_context(const winhttp_cert_chain_context&) = delete;
4949
winhttp_cert_chain_context& operator=(const winhttp_cert_chain_context&) = delete;
5050
~winhttp_cert_chain_context()

Release/src/utilities/asyncrt_utils.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ namespace
5151
}
5252
};
5353

54-
constexpr to_lower_ch_impl to_lower_ch{};
54+
CPPREST_CONSTEXPR to_lower_ch_impl to_lower_ch{};
5555

5656
struct eq_lower_ch_impl
5757
{
@@ -62,7 +62,7 @@ namespace
6262
}
6363
};
6464

65-
constexpr eq_lower_ch_impl eq_lower_ch{};
65+
CPPREST_CONSTEXPR eq_lower_ch_impl eq_lower_ch{};
6666

6767
struct lt_lower_ch_impl
6868
{
@@ -73,8 +73,8 @@ namespace
7373
}
7474
};
7575

76-
constexpr lt_lower_ch_impl lt_lower_ch{};
77-
}
76+
CPPREST_CONSTEXPR lt_lower_ch_impl lt_lower_ch{};
77+
}
7878

7979
namespace utility
8080
{

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
cpprestsdk (2.10.6)
2+
----------------------
3+
* PR#844 Fix clang build error
4+
-- cpprestsdk team <[email protected]> MON, 30 Aug 2018 16:51:00 -0800
5+
16
cpprestsdk (2.10.5)
27
----------------------
38
* Issue#842 Fix incorrect `cpprest/version.h`

0 commit comments

Comments
 (0)