timemory 3.3.0
Modular C++ Toolkit for Performance Analysis and Logging. Profiling API and Tools for C, C++, CUDA, Fortran, and Python. The C++ template API is essentially a framework to creating tools: it is designed to provide a unifying interface for recording various performance measurements alongside data logging and interfaces to other tools.
tim::operation::construct< Tp > Struct Template Reference

The purpose of this operation class is construct an object with specific args. More...

#include "timemory/operations/types/construct.hpp"

+ Collaboration diagram for tim::operation::construct< Tp >:

Public Types

using type = Tp
 

Public Member Functions

 TIMEMORY_DELETED_OBJECT (construct) template< typename Arg
 
typename Args construct (type &obj, Arg &&arg, Args &&... args)
 
template<typename... Args, enable_if_t< sizeof...(Args)==0, int > = 0>
 construct (type &, Args &&...)
 

Static Public Member Functions

template<typename... Args, enable_if_t< std::is_constructible< Tp, Args... >::value, int > = 0>
static auto get (Args &&... args)
 
template<typename... Args, enable_if_t<!std::is_constructible< Tp, Args... >::value &&std::is_default_constructible< Tp >::value, int > = 0>
static auto get (Args &&...)
 

Detailed Description

template<typename Tp>
struct tim::operation::construct< Tp >

The purpose of this operation class is construct an object with specific args.

Definition at line 51 of file construct.hpp.

Member Typedef Documentation

◆ type

template<typename Tp >
using tim::operation::construct< Tp >::type = Tp

Definition at line 53 of file construct.hpp.

Constructor & Destructor Documentation

◆ construct() [1/2]

template<typename Tp >
tim::operation::construct< Tp >::construct ( type obj,
Arg &&  arg,
Args &&...  args 
)

Definition at line 135 of file construct.hpp.

136{
137 sfinae(obj, 0, std::forward<Arg>(arg), std::forward<Args>(args)...);
138}

◆ construct() [2/2]

template<typename Tp >
template<typename... Args, enable_if_t< sizeof...(Args)==0, int > >
tim::operation::construct< Tp >::construct ( type ,
Args &&  ... 
)

Definition at line 144 of file construct.hpp.

145{}

Member Function Documentation

◆ get() [1/2]

template<typename Tp >
template<typename... Args, enable_if_t< std::is_constructible< Tp, Args... >::value, int > = 0>
static auto tim::operation::construct< Tp >::get ( Args &&...  args)
inlinestatic

Definition at line 65 of file construct.hpp.

66 {
67 return Tp(std::forward<Args>(args)...);
68 }

◆ get() [2/2]

template<typename Tp >
template<typename... Args, enable_if_t<!std::is_constructible< Tp, Args... >::value &&std::is_default_constructible< Tp >::value, int > = 0>
static auto tim::operation::construct< Tp >::get ( Args &&  ...)
inlinestatic

Definition at line 73 of file construct.hpp.

74 {
75 return Tp{};
76 }

◆ TIMEMORY_DELETED_OBJECT()

template<typename Tp >
tim::operation::construct< Tp >::TIMEMORY_DELETED_OBJECT ( construct< Tp >  )

The documentation for this struct was generated from the following files: