Qx v0.5.7
Qt Extensions Library
Loading...
Searching...
No Matches
qx-helpers.h
Go to the documentation of this file.
1#ifndef QX_HELPERS_H
2#define QX_HELPERS_H
3
4// Standard Library Includes
5#include <type_traits>
6
7//Non-namespace Functions----------------------------------------------------------
8template <typename T>
9const T qxAsConst(T&& t) { return std::move(t); }
10
11template <typename T>
12typename std::add_const<T>::type qxAsConst(T& t) { return qAsConst(t); }
13
14template <typename T>
15void qxDelete(T*& pointer)
16{
17 delete pointer;
18 pointer = nullptr;
19}
20
21#endif // QX_HELPERS_H
void qxDelete(T *&pointer)
Definition qx-helpers.h:15
const T qxAsConst(T &&t)
Definition qx-helpers.h:9