Cppgres
Build Postgres extensions in C++
Loading...
Searching...
No Matches
cppgres::combinable_aggregate Concept Reference

Aggregate state that can be combined with another instance (parallel aggregation) More...

#include <aggregate.hpp>

Concept definition

template<class T, class... Args>
concept cppgres::combinable_aggregate = aggregate<T, Args...> && requires(const T &t, const T &t1) {
{ T(t, t1) } -> std::same_as<T>;
}
Definition: aggregate.hpp:13
Aggregate state that can be combined with another instance (parallel aggregation)
Definition: aggregate.hpp:37

Detailed Description

Aggregate state that can be combined with another instance (parallel aggregation)

The combining constructor T(const T &, const T &) receives both operands as const references. Both operands remain owned by the aggregate memory context and their destructors still run when it is reset, so the constructor must not take ownership of (or alias) resources held by either operand: deep-copy them or share them through reference-counted handles.