Initial commit
This commit is contained in:
commit
91d54c58d5
42 changed files with 2212 additions and 0 deletions
28
src/semantics/floating_point.cppm
Normal file
28
src/semantics/floating_point.cppm
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
export module bedrock.semantics:floating_point;
|
||||
|
||||
namespace br {
|
||||
|
||||
template <typename T>
|
||||
struct FloatingPointTraits {
|
||||
static constexpr bool is_valid = false;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct FloatingPointTraits<float> {
|
||||
static constexpr bool is_valid = true;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct FloatingPointTraits<double> {
|
||||
static constexpr bool is_valid = true;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct FloatingPointTraits<long double> {
|
||||
static constexpr bool is_valid = true;
|
||||
};
|
||||
|
||||
export template <typename T>
|
||||
concept FloatingPoint = FloatingPointTraits<T>::is_valid;
|
||||
|
||||
} // namespace br
|
||||
Loading…
Add table
Add a link
Reference in a new issue