CBMC
constructor_of.h
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module: constructor_of
4
5
Author: Diffblue Ltd.
6
7
\*******************************************************************/
8
9
#ifndef CPROVER_UTIL_CONSTRUCTOR_OF_H
10
#define CPROVER_UTIL_CONSTRUCTOR_OF_H
11
12
#include <utility>
13
16
template
<
typename
constructedt>
17
class
constructor_oft
final
18
{
19
public
:
20
template
<
typename
... argumentst>
21
constructedt
operator()
(argumentst &&... arguments)
22
{
23
return
constructedt{std::forward<argumentst>(arguments)...};
24
}
25
};
26
29
template
<
typename
constructedt>
30
constexpr
constructor_oft<constructedt>
constructor_of
()
31
{
32
return
{};
33
}
34
35
#endif // CPROVER_UTIL_CONSTRUCTOR_OF_H
constructor_oft::operator()
constructedt operator()(argumentst &&... arguments)
Definition:
constructor_of.h:21
constructor_oft
A type of functor which wraps around the set of constructors of a type.
Definition:
constructor_of.h:17
constructor_of
constexpr constructor_oft< constructedt > constructor_of()
Returns a functor which constructs type constructedt.
Definition:
constructor_of.h:30
src
util
constructor_of.h
Generated by
1.8.17