fix: build under gcc
This commit is contained in:
@@ -153,4 +153,3 @@ SpacesInSquareBrackets: false
|
||||
Standard: Latest
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
||||
...
|
||||
+5
-2
@@ -1,10 +1,14 @@
|
||||
---
|
||||
Checks: '*,-modernize-use-nodiscard'
|
||||
Checks: '*,-modernize-use-nodiscard,-llvmlibc-*,-fuchsia-trailing-return,-fuchsia*,-altera-*'
|
||||
WarningsAsErrors: ''
|
||||
HeaderFilterRegex: ''
|
||||
AnalyzeTemporaryDtors: false
|
||||
FormatStyle: file
|
||||
CheckOptions:
|
||||
- key: readability-braces-around-statements.ShortStatementLines
|
||||
value: '1'
|
||||
- key: hicpp-braces-around-statements.ShortStatementLines
|
||||
value: '1'
|
||||
- key: bugprone-use-after-move
|
||||
value: '1'
|
||||
- key: bugprone-assert-side-effect.AssertMacros
|
||||
@@ -41,4 +45,3 @@ CheckOptions:
|
||||
value: '0'
|
||||
- key: hicpp-special-member-functions.AllowSoleDefaultDtor
|
||||
value: '0'
|
||||
...
|
||||
Vendored
+1
@@ -9,4 +9,5 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"editor.formatOnSave": true,
|
||||
}
|
||||
+4
-2
@@ -27,8 +27,10 @@ list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
|
||||
include(CTest)
|
||||
include(Catch)
|
||||
|
||||
set(CMAKE_C_COMPILER /opt/homebrew/Cellar/llvm@16/16.0.6/bin/clang)
|
||||
set(CMAKE_CXX_COMPILER /opt/homebrew/Cellar/llvm@16/16.0.6/bin/clang++)
|
||||
if(APPLE)
|
||||
set(CMAKE_C_COMPILER /opt/homebrew/Cellar/llvm@16/16.0.6/bin/clang)
|
||||
set(CMAKE_CXX_COMPILER /opt/homebrew/Cellar/llvm@16/16.0.6/bin/clang++)
|
||||
endif()
|
||||
|
||||
SET(CALCULATOR_CHALLENGE_SOURCES
|
||||
Calculator.cpp
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Calculator.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <ranges>
|
||||
#include <unordered_map>
|
||||
|
||||
|
||||
+4
-5
@@ -1,10 +1,9 @@
|
||||
#ifndef CALCULATOR_CHALLENGE_WORKSPACE_HPP
|
||||
#define CALCULATOR_CHALLENGE_WORKSPACE_HPP
|
||||
#ifndef CALCULATOR_CHALLENGE_CALCULATOR_HPP
|
||||
#define CALCULATOR_CHALLENGE_CALCULATOR_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <stack>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "Operand.hpp"
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ struct OperationMembers
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
auto text_to_number(std::string_view text) noexcept
|
||||
auto text_to_number(std::string_view text) noexcept -> T
|
||||
{
|
||||
if (text.empty()) return T{};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user