sys: Fixed broken concept
This commit is contained in:
parent
1a157c7256
commit
ef9f0cfca7
@ -144,5 +144,13 @@ namespace hex {
|
||||
concept floating_point = std::is_floating_point<T>::value;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
struct always_false : std::false_type {};
|
||||
namespace hex {
|
||||
|
||||
template<typename T>
|
||||
struct always_false : std::false_type {};
|
||||
|
||||
template<typename T, size_t Size>
|
||||
concept has_size = sizeof(T) == Size;
|
||||
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <hex/views/view.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
#include <hex/helpers/concepts.hpp>
|
||||
|
||||
#include <cstring>
|
||||
#include <codecvt>
|
||||
@ -22,7 +23,7 @@ namespace hex::lang {
|
||||
|
||||
namespace {
|
||||
|
||||
template<typename T> requires requires { sizeof(T) == 1; }
|
||||
template<hex::has_size<1> T>
|
||||
std::string makeDisplayable(T *data, size_t size) {
|
||||
std::string result;
|
||||
for (T* c = data; c < (data + size); c++) {
|
||||
|
Loading…
Reference in New Issue
Block a user