Qx v0.5.8
Qt Extensions Library
|
The qx-concepts header file provides a set of various convenience functions that are are designed to facilitate common fundamental tasks with as brief syntax as possible. More...
#include <type_traits>
Go to the source code of this file.
Classes | |
struct | qxFuncAggregate< Functors > |
Functions | |
template<typename T > | |
const T | qxAsConst (T &&t) |
template<typename T > | |
std::add_const< T >::type | qxAsConst (T &t) |
template<typename T > | |
void | qxDelete (T *&pointer) |
const T qxAsConst | ( | T && | t | ) |
Serves the same purpose as qAsConst() (preventing implicitly-shared Qt containers from detaching), but this version works for rvalues, albeit with some efficiency concerns depending on the nature of t.
std::add_const< T >::type qxAsConst | ( | T & | t | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Equivalent to qAsConst(T& t).
This overload exists so that qxAsConst can consistently be used everywhere for both lvalues and rvalues, instead of having to employ mixed usage of qxAsConst() and qAsConst().
void qxDelete | ( | T *& | pointer | ) |
Calls delete
on pointer and then sets it to nullptr
.