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
#pragma once

#include <optional><--- 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 assignment : base<std::optional<T>>, scalar_multipliable<assignment<T>>::identity, associative {
    using base<std::optional<T>>::base;

    friend inline assignment operator+(const assignment& lhs, const assignment& rhs) noexcept(NO_EXCEPT) {
        if(lhs->has_value()) return lhs;
        return rhs;
    }
};


} // namespace algebraic

} // namespace uni