Tannic
A C++ Tensor Library
Loading...
Searching...
No Matches
traits.hpp
Go to the documentation of this file.
1// Copyright 2025 Eric Hermosis
2//
3// This file is part of the Tannic Tensor Library.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing, software
12// distributed under the License is distributed on an "AS IS" BASIS,
13// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17
18#ifndef TRAITS_HPP
19#define TRAITS_HPP
20
21#include <type_traits>
22#include "concepts.hpp"
23
24namespace tannic {
25
26template<typename T>
27struct Trait {
28 using Reference = std::decay_t<T>;;
29 static constexpr bool is_assignable = Assignable<Reference>;
30 static constexpr bool is_comparable = Comparable<Reference>;
31};
32
33} // namespace TANNIC
34
35#endif // TRAITS_HPP
Concept for types that can assign values.
Definition: concepts.hpp:171
Concept for types that can compare their value.
Definition: concepts.hpp:195
Definition: buffer.hpp:41
Definition: traits.hpp:27
std::decay_t< T > Reference
Definition: traits.hpp:28
static constexpr bool is_comparable
Definition: traits.hpp:30
static constexpr bool is_assignable
Definition: traits.hpp:29