Skip to content

Commit

Permalink
fix gcc build
Browse files Browse the repository at this point in the history
  • Loading branch information
matcool committed Nov 10, 2024
1 parent 77c99a7 commit 11d3711
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ build/

## VSCode.gitignore

.vscode/
.vscode/

.cache/
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.21 FATAL_ERROR)
cmake_policy(SET CMP0097 NEW)

project(GeodeResult VERSION 1.0.0 LANGUAGES C CXX)
project(GeodeResult VERSION 1.1.1 LANGUAGES C CXX)

add_library(GeodeResult INTERFACE)

Expand All @@ -14,4 +14,4 @@ target_include_directories(GeodeResult INTERFACE

if (PROJECT_IS_TOP_LEVEL)
add_subdirectory(test)
endif()
endif()
10 changes: 7 additions & 3 deletions include/Geode/Result.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,9 @@ namespace geode {
/// @brief Inspects the Ok value with an operation
/// @param operation the operation to call the Ok value with
/// @return the Result itself
constexpr Result<OkType, ErrType>& inspect(std::invocable<OkType const&> auto&& operation
template <class Fn>
requires(!std::same_as<OkType, void> && std::invocable<Fn, OkType const&>)
constexpr Result<OkType, ErrType>& inspect(Fn&& operation
) noexcept(noexcept(operation(std::declval<OkType const&>()))) {
this->inspectInternal(operation);
return *this;
Expand All @@ -1080,7 +1082,9 @@ namespace geode {
/// @brief Inspects the Err value with an operation
/// @param operation the operation to call the Err value with
/// @return the Result itself
constexpr Result<OkType, ErrType>& inspectErr(std::invocable<ErrType const&> auto&& operation
template <class Fn>
requires(!std::same_as<ErrType, void> && std::invocable<Fn, ErrType const&>)
constexpr Result<OkType, ErrType>& inspectErr(Fn&& operation
) noexcept(noexcept(operation(std::declval<ErrType const&>()))) {
this->inspectInternalErr(operation);
return *this;
Expand Down Expand Up @@ -1379,4 +1383,4 @@ namespace geode {
}
}

#endif // GEODE_RESULT_HPP
#endif // GEODE_RESULT_HPP

0 comments on commit 11d3711

Please sign in to comment.