ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::SmartPointerConcept Concept Reference

The Pointer concept is an extension of the usual std::is_pointer_v type trait to also include the smart pointers like std::shared_ptr<T>, std::unique_ptr<T> The smart pointer is required to have an element_type typedef indicating over which data type the pointer is constructed, the arrow operator. More...

#include <Acts/Utilities/PointerTraits.hpp>

Concept definition

template<typename Pointer_t>
concept Acts::SmartPointerConcept = requires(Pointer_t ptr) {
typename Pointer_t::element_type;
{
ptr.operator->()
} -> std::same_as<std::add_pointer_t<typename Pointer_t::element_type>>;
{ ptr.operator*() } -> std::same_as<typename Pointer_t::element_type&>;
{ ptr.operator bool() };
}
The Pointer concept is an extension of the usual std::is_pointer_v type trait to also include the sma...
Definition PointerTraits.hpp:28

Detailed Description

The Pointer concept is an extension of the usual std::is_pointer_v type trait to also include the smart pointers like std::shared_ptr<T>, std::unique_ptr<T> The smart pointer is required to have an element_type typedef indicating over which data type the pointer is constructed, the arrow operator.

 T* operator->() const;

and also the dereference operator

T& operator*() const