AdditiveMagma concept

Description

An additive magma is a magma equipped with the addition operator.

Refinement of

Magma, see notes.

Associated types

Corresponding functor glas::add_functor

Notation

S type of a set
A type of a set convertible to S
B type of a set convertible to S
a Object of type A
b Object of type B
s Object of type S

Definitions

Valid expressions

In addition to those defined by convertible:
Name Expression Return type
Addition a+b add_functor<A,B>::result_type, convertible to S
AdditionAssignment s+=b S

Expression semantics

Name Expression Precondition Semantics Postcondition
Addition a+b can actually be anything as long as it fulfills the requirements of the addition
AdditionAssignment s+=b equivalent to s=s+b

Complexity guarantees

Invariants

Closure a+b returns an object that is convertible to an element of the set S

Models

Notes