CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
constructor_of.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: constructor_of
4
5Author: Diffblue Ltd.
6
7\*******************************************************************/
8
9#ifndef CPROVER_UTIL_CONSTRUCTOR_OF_H
10#define CPROVER_UTIL_CONSTRUCTOR_OF_H
11
12#include <utility>
13
16template <typename constructedt>
17class constructor_oft final
18{
19public:
20 template <typename... argumentst>
21 constructedt operator()(argumentst &&... arguments)
22 {
23 return constructedt{std::forward<argumentst>(arguments)...};
24 }
25};
26
29template <typename constructedt>
31{
32 return {};
33}
34
35#endif // CPROVER_UTIL_CONSTRUCTOR_OF_H
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
A type of functor which wraps around the set of constructors of a type.
constructedt operator()(argumentst &&... arguments)
constexpr constructor_oft< constructedt > constructor_of()
Returns a functor which constructs type constructedt.