IntegralCalculator

class IntegralCalculator

A calculator demonstrating concept autolinking in requires clauses.

Header: concepts.h

Public Functions

void doubleValue(Integral auto value)
T processConcept(T value)
T sum(T a, T b)

Detailed Description

IntegralCalculator exercises the template-head and trailing requires forms against the documented Integral concept. The rendered synopses should hyperlink Integral to its concept reference page.

Member Function Documentation

template<Integral value:auto> void IntegralCalculator::doubleValue(Integral auto value)

Doubles value using the constrained-auto syntax. Used as a regression check that the existing constrained-auto autolink path is preserved alongside the new requires-clause work.

template<typename T> T IntegralCalculator::processConcept(T value) requires Integral<T>

Doubles value using a trailing requires clause that names the Integral concept directly.

template<typename T> requires Integral<T> T IntegralCalculator::sum(T a, T b)

Sums a and b, constrained by the Integral concept.

Exercises the template-head requires form, which appears before the function declaration.