1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once


#include <limits><--- Include file:  not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <functional><--- Include file:  not found. Please note: Cppcheck does not need standard library headers to get proper results.

#include "internal/dev_env.hpp"
#include "algebraic/base.hpp"


namespace uni {

namespace algebraic {


template<class T>
struct maximum : base<T>, scalar_multipliable<maximum<T>>::identity, associative, commutative {
    using base<T>::base;

    maximum() noexcept(NO_EXCEPT) : maximum(std::numeric_limits<T>::lowest()) {};

    friend inline maximum operator+(const maximum& lhs, const maximum& rhs) noexcept(NO_EXCEPT) {
        return std::max(lhs.val(), rhs.val());
    }
};


} // namespace algebraic

} // namespace uni