halcheck
1.0
Loading...
Searching...
No Matches
include
halcheck
lib
memory.hpp
1
#ifndef HALCHECK_LIB_MEMORY_HPP
2
#define HALCHECK_LIB_MEMORY_HPP
3
11
#include <halcheck/lib/type_traits.hpp>
12
13
#include <
memory
>
// IWYU pragma: export
14
#include <
type_traits
>
15
16
namespace
halcheck {
namespace
lib {
17
22
template
<
typename
T,
typename
... Args,
HALCHECK_REQUIRE
(!
std::is_array<T>
())>
23
std::unique_ptr<T>
make_unique
(Args... args) {
24
return
std::unique_ptr<T>
(
new
T(
std::forward<Args>
(args)...));
25
}
26
27
}}
// namespace halcheck::lib
28
29
#endif
std::forward
T forward(T... args)
HALCHECK_REQUIRE
#define HALCHECK_REQUIRE(...)
Expands to a template argument that is only valid if the given argument evaluates to true.
Definition
type_traits.hpp:24
std::is_array
memory
halcheck::lib::make_unique
std::unique_ptr< T > make_unique(Args... args)
An implementation of std::make_unique.
Definition
memory.hpp:23
type_traits
std::unique_ptr
Generated by
1.12.0