DocWire SDK
DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, document analysis. Offline processing possible for security and confidentiality
docwire::invocation_concepts Namespace Reference

Provides concepts for working with invocable objects and pushable containers. More...

Variables

template<typename T >
concept invocable = invocation_traits::is_invocable_v<T>
 Checks if a type is invocable. More...
 
template<typename T >
concept not_invocable = not invocable<T>
 Checks if a type is not invocable. More...
 
template<typename T >
concept pushable
 Checks if a type is pushable. More...
 

Detailed Description

Provides concepts for working with invocable objects and pushable containers.

This namespace contains concepts that can be used to constrain template parameters to invocable objects and pushable containers. The concepts are built on top of the traits classes provided in the docwire::invocation_traits namespace.

Variable Documentation

◆ invocable

template<typename T >
concept docwire::invocation_concepts::invocable = invocation_traits::is_invocable_v<T>

Checks if a type is invocable.

A type is considered invocable if it can be called like a function. This concept uses the docwire::invocation_traits::is_invocable_v trait to check for invocability.

Template Parameters
TThe type to check for invocability.

Definition at line 35 of file invocation_concepts.h.

◆ not_invocable

template<typename T >
concept docwire::invocation_concepts::not_invocable = not invocable<T>

Checks if a type is not invocable.

A type is considered not invocable if it cannot be called like a function. This concept is the negation of the invocable concept.

Template Parameters
TThe type to check for non-invocability.

Definition at line 46 of file invocation_concepts.h.

◆ pushable

template<typename T >
concept docwire::invocation_concepts::pushable
Initial value:
= requires(T&& t) {
{ t.push_back(std::declval<typename std::remove_reference_t<T>::value_type>()) };
}
requires(std::is_arithmetic_v< T > &&!value_alternative< T >) struct serializer< T >
Specialization for arithmetic types (integers, floats).

Checks if a type is pushable.

A type is considered pushable if it provides a push_back member function that can be used to append elements to the container. This concept uses a requires clause to check for the presence of the push_back member function.

Template Parameters
TThe type to check for pushability.

Definition at line 57 of file invocation_concepts.h.