Skip to content

Commit 3e20e23

Browse files
committed
fix win
1 parent d5c26ac commit 3e20e23

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/xtl/xbasic_fixed_string.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ namespace xtl
218218
struct select_storage<buffer | store_size>
219219
{
220220
template <class T, std::size_t N>
221-
using type = typename select_fixed_storage<T[N + 1], N < (1u << (8 * sizeof(T)))>::type;
221+
using type = typename select_fixed_storage<T[N + 1], N < (1ull << (8 * sizeof(T)))>::type;
222222
};
223223

224224
template <>

test/test_xbasic_fixed_string.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ namespace xtl
11701170
{
11711171
std::string s = "thisisatest";
11721172
char buf[16];
1173-
strcpy(buf, s.c_str());
1173+
strcpy_s(buf, sizeof(buf), s.c_str());
11741174
numpy_string* x = reinterpret_cast<numpy_string*>(buf);
11751175

11761176
EXPECT_EQ(*x, s);
@@ -1277,8 +1277,8 @@ namespace xtl
12771277

12781278
TEST(xfixed_string, limit)
12791279
{
1280-
using string_type = xbasic_fixed_string<char, 255, buffer | store_size, string_policy::throwing_error>;
1281-
string_type s1 = "hello";
1280+
using string_type_ = xbasic_fixed_string<char, 255, buffer | store_size, string_policy::throwing_error>;
1281+
string_type_ s1 = "hello";
12821282
static_assert(sizeof(s1) == 256 * sizeof(char), "minimal storage");
12831283
}
12841284

0 commit comments

Comments
 (0)