Skip to content

Commit 515d2a9

Browse files
authored
Merge pull request #30 from 5cript/feat/clang-20-warning-fixes
Fixed literal warnings.
2 parents ed28f3c + 48e199f commit 515d2a9

4 files changed

Lines changed: 14 additions & 57 deletions

File tree

.github/workflows/build_and_test.yml

Lines changed: 7 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
steps:
2121
- uses: actions/checkout@v3
22-
- uses: awalsh128/cache-apt-pkgs-action@v1.3.0
22+
- uses: awalsh128/cache-apt-pkgs-action@v1.4.3
2323
with:
2424
packages: libcurl4-openssl-dev libcrypto++-dev ninja-build
2525

@@ -30,7 +30,7 @@ jobs:
3030
# REQUIRED: Specify the required boost version
3131
# A list of supported versions can be found here:
3232
# https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json
33-
boost_version: 1.83.0
33+
boost_version: 1.87.0
3434
# OPTIONAL: Specify a platform version
3535
platform_version: 22.04
3636

@@ -52,49 +52,6 @@ jobs:
5252
working-directory: ${{github.workspace}}/build/clang_${{env.BUILD_TYPE}}
5353
run: ./tests/bin/roar-tests
5454

55-
ubuntu20:
56-
runs-on: ubuntu-20.04
57-
58-
steps:
59-
- uses: actions/checkout@v3
60-
- uses: awalsh128/cache-apt-pkgs-action@v1.3.0
61-
with:
62-
packages: libcurl4-openssl-dev libcrypto++-dev ninja-build
63-
64-
- name: Install boost
65-
uses: MarkusJx/install-boost@v2.4.5
66-
id: install-boost
67-
with:
68-
# REQUIRED: Specify the required boost version
69-
# A list of supported versions can be found here:
70-
# https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json
71-
boost_version: 1.83.0
72-
# OPTIONAL: Specify a platform version
73-
platform_version: 20.04
74-
75-
- name: Setup clang
76-
uses: egor-tensin/setup-clang@v1
77-
with:
78-
version: 15
79-
platform: x64
80-
81-
- name: Configure CMake
82-
run: >
83-
cmake
84-
-B ${{github.workspace}}/build/clang_${{env.BUILD_TYPE}}
85-
-G"Ninja"
86-
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
87-
-DROAR_BUILD_TESTS=on
88-
-DCMAKE_CXX_EXTENSIONS=on
89-
-DCMAKE_CXX_COMPILER=c++
90-
-DCMAKE_C_COMPILER=cc
91-
-DCMAKE_CXX_STANDARD=20
92-
env:
93-
Boost_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
94-
95-
- name: Build
96-
run: cmake --build ${{github.workspace}}/build/clang_${{env.BUILD_TYPE}} --config ${{env.BUILD_TYPE}}
97-
9855
windows-msys2:
9956
runs-on: windows-2022
10057
defaults:
@@ -129,12 +86,12 @@ jobs:
12986
run: cmake --build ${{env.WSPACE}}/build/clang_${{env.BUILD_TYPE}} --config ${{env.BUILD_TYPE}}
13087

13188
macos:
132-
runs-on: macos-13
89+
runs-on: macos-15
13390

13491
steps:
13592
- uses: actions/checkout@v3
13693

137-
- run: brew install ninja boost cryptopp curl llvm@16
94+
- run: brew install ninja boost cryptopp curl llvm@19
13895

13996
- name: Get Brew Prefix
14097
run: |
@@ -148,9 +105,9 @@ jobs:
148105
- name: Configure CMake
149106
run: >
150107
cmake
151-
-DCMAKE_C_COMPILER=$BREW_PREFIX/opt/llvm@16/bin/clang
152-
-DCMAKE_CXX_COMPILER=$BREW_PREFIX/opt/llvm@16/bin/clang++
153-
-DCMAKE_LINKER=$BREW_PREFIX/opt/llvm@16/bin/lld
108+
-DCMAKE_C_COMPILER=$BREW_PREFIX/opt/llvm@19/bin/clang
109+
-DCMAKE_CXX_COMPILER=$BREW_PREFIX/opt/llvm@19/bin/clang++
110+
-DCMAKE_LINKER=$BREW_PREFIX/opt/llvm@19/bin/lld
154111
-DROAR_BUILD_TESTS=on
155112
-S ${{github.workspace}}
156113
-B ${{github.workspace}}/build/clang_${{env.BUILD_TYPE}}

include/roar/literals/memory.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,27 @@ namespace Roar
66
{
77
inline namespace MemoryLiterals
88
{
9-
constexpr unsigned long long operator"" _Bytes(unsigned long long n)
9+
constexpr unsigned long long operator""_Bytes(unsigned long long n)
1010
{
1111
return n;
1212
}
1313

14-
constexpr unsigned long long operator"" _KiB(unsigned long long n)
14+
constexpr unsigned long long operator""_KiB(unsigned long long n)
1515
{
1616
return n * 1024ull;
1717
}
1818

19-
constexpr unsigned long long operator"" _MiB(unsigned long long n)
19+
constexpr unsigned long long operator""_MiB(unsigned long long n)
2020
{
2121
return n * 1024ull * 1024ull;
2222
}
2323

24-
constexpr unsigned long long operator"" _GiB(unsigned long long n)
24+
constexpr unsigned long long operator""_GiB(unsigned long long n)
2525
{
2626
return n * 1024ull * 1024ull * 1024ull;
2727
}
2828

29-
constexpr unsigned long long operator"" _MemoryPage(unsigned long long n)
29+
constexpr unsigned long long operator""_MemoryPage(unsigned long long n)
3030
{
3131
return n * 4_KiB;
3232
}

include/roar/literals/regex.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace Roar
2020
{
2121
inline namespace RegexLiterals
2222
{
23-
inline PseudoRegex operator"" _rgx(char const* regexString, std::size_t length)
23+
inline PseudoRegex operator""_rgx(char const* regexString, std::size_t length)
2424
{
2525
return PseudoRegex{regexString, length};
2626
}

include/roar/server.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace Roar
3838
boost::asio::any_io_executor executor;
3939

4040
/// Supply for SSL support.
41-
std::optional<std::variant<SslServerContext, boost::asio::ssl::context>> sslContext;
41+
std::optional<std::variant<SslServerContext, boost::asio::ssl::context>> sslContext = std::nullopt;
4242

4343
/// Called when an error occurs in an asynchronous routine.
4444
std::function<void(Error&&)> onError = [](auto&&) {};

0 commit comments

Comments
 (0)