1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
diff --git a/io/include/aw/io/mmap_file.h b/io/include/aw/io/mmap_file.h
index 9846973..65e82aa 100644
--- a/io/include/aw/io/mmap_file.h
+++ b/io/include/aw/io/mmap_file.h
@@ -83,18 +83,18 @@ using win32::file_mapping;
inline file_mode get_file_mode(map_perms perms)
{
using mp = map_perms;
- switch (perms) {
- case mp::none:
- case mp::none|mp::exec:
+ switch (static_cast<unsigned>(perms)) {
+ case static_cast<unsigned>(mp::none):
+ case static_cast<unsigned>(mp::none|mp::exec):
return file_mode::none;
- case mp::read:
- case mp::read|mp::exec:
+ case static_cast<unsigned>(mp::read):
+ case static_cast<unsigned>(mp::read|mp::exec):
return file_mode::read;
- case mp::write:
+ case static_cast<unsigned>(mp::write):
return file_mode::write;
- case mp::write|mp::exec:
- case mp::rdwr:
- case mp::rdwr|mp::exec:
+ case static_cast<unsigned>(mp::write|mp::exec):
+ case static_cast<unsigned>(mp::rdwr):
+ case static_cast<unsigned>(mp::rdwr|mp::exec):
return file_mode::read|file_mode::write;
}
diff --git a/types/include/aw/types/bits/variant_dispatch.h b/types/include/aw/types/bits/variant_dispatch.h
index 9d5dc3b..95a9394 100644
--- a/types/include/aw/types/bits/variant_dispatch.h
+++ b/types/include/aw/types/bits/variant_dispatch.h
@@ -71,11 +71,11 @@ struct vh_recursive {
if constexpr (Length_left > 0)
{
if (index < Mid)
- return vh_recursive<Start,Mid,Ts...>::template dispatch(index, storage, f);
+ return vh_recursive<Start,Mid,Ts...>::dispatch(index, storage, f);
}
if constexpr (Length_right > 1)
- return vh_recursive<Mid+1,End,Ts...>::template dispatch(index, storage, f);
+ return vh_recursive<Mid+1,End,Ts...>::dispatch(index, storage, f);
_unreachable();
}
diff --git a/types/include/aw/types/byte_buffer.h b/types/include/aw/types/byte_buffer.h
index 82f4693..b38c46a 100644
--- a/types/include/aw/types/byte_buffer.h
+++ b/types/include/aw/types/byte_buffer.h
@@ -8,6 +8,7 @@
*/
#ifndef aw_types_byte_buffer_h
#define aw_types_byte_buffer_h
+#include <cstdlib>
#include <memory>
namespace aw {
/**
diff --git a/types/include/aw/types/containers/queue.h b/types/include/aw/types/containers/queue.h
index af8f13b..8398e8c 100644
--- a/types/include/aw/types/containers/queue.h
+++ b/types/include/aw/types/containers/queue.h
@@ -96,7 +96,7 @@ protected:
queue_base(queue_base&& other, Allocator const& alloc) noexcept
: impl(alloc)
{
- if (alloc == other.alloc)
+ if (alloc == static_cast<Allocator&>(other.impl))
impl.swap(other.impl);
else
create_storage(other.allocated_size());
|