LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
util::Constructible Concept Reference

Matches types that can be constructed from the given arguments. More...

#include <Concepts.hpp>

Concept definition

template<typename T, typename... Args>
concept util::Constructible = requires(Args&&... args) {
T(std::forward<Args>(args)...);
}
Matches types that can be constructed from the given arguments.
Definition Concepts.hpp:45

Detailed Description

Matches types that can be constructed from the given arguments.

A more readable alternative to std::enable_if_t with std::is_constructible_v.

Template Parameters
TThe type to construct
ArgsThe argument types
Example
template <typename T, typename... Args>
requires Constructible<T, Args...>
void create(Args&&... args) {
T instance(std::forward<Args>(args)...);
}