JH-Toolkit v1.4.1
An engineering-oriented C++20 toolkit with duck-typed concepts, static design, async coroutines, and semantic containers — header-only, RTTI-free, and concurrency-friendly.
Loading...
Searching...
No Matches
jh::concepts::closable_container_for Concept Reference

Concept checking whether a container C can be directly constructed ("closed") from a range R. More...

#include <jh/conceptual/closable_container.h>

Concept definition

template<typename C, typename R, typename ArgsTuple = std::tuple<>>
std::ranges::input_range<R> &&
detail::closable_container_for_impl<C, R, ArgsTuple>::value
Concept checking whether a container C can be directly constructed ("closed") from a range R.
Definition closable_container.h:292

Detailed Description

Concept checking whether a container C can be directly constructed ("closed") from a range R.

This concept verifies, at compile time, that a container type C can be constructed from an input range R either directly (via iterator constructor) or indirectly (through intermediate vectorization or adapter construction).

Requirements

  • R must model std::ranges::input_range.
  • detail::compute_closable_status<C, R> must return a non-none value.

Equivalent to

std::ranges::input_range<R> && detail::closable_container_for_impl<C, R>::value

Template Parameters
Ccandidate container type
Rinput range type
ArgsTupleoptional tuple of constructor argument types