Initial Commit
This commit is contained in:
9
examples/concepts/foundation.hpp
Normal file
9
examples/concepts/foundation.hpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
#include <concepts>
|
||||
namespace demo {
|
||||
template<class T>
|
||||
concept Addable = requires(T value) { value + value; };
|
||||
|
||||
template<class T>
|
||||
concept Arithmetic = Addable<T> && (std::integral<T> || std::floating_point<T>);
|
||||
}
|
||||
Reference in New Issue
Block a user