Skip to content

Commit

Permalink
🕸 Add missing include and missing concept conversion 🚨
Browse files Browse the repository at this point in the history
  • Loading branch information
GHF committed Nov 16, 2023
1 parent 21353eb commit 3ad39f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"vector": "cpp",
"algorithm": "cpp",
"concepts": "cpp",
"span": "cpp"
"span": "cpp",
"type_traits": "cpp"
}
}
4 changes: 2 additions & 2 deletions mays/internal/concepts.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <concepts>
#include <type_traits>
#include <utility>

namespace mays::internal {

Expand All @@ -20,8 +21,7 @@ concept is_convertible_without_narrowing = std::convertible_to<From, To> && requ

// True if T sign-extends when right-shifted (two's complement representation is assumed).
template <class T>
concept has_arithmetic_shift =
std::is_integral_v<T> && std::bool_constant<(T{-1} >> 1) == T{-1}>::value;
concept has_arithmetic_shift = std::integral<T> && std::bool_constant<(T{-1} >> 1) == T{-1}>::value;

} // namespace mays::internal

Expand Down

0 comments on commit 3ad39f8

Please sign in to comment.