Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 22, 2024
1 parent 7e7a98b commit 97c2f49
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions qt/KDStlContainerAdaptor/test/tst_KDStlContainerAdaptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,18 @@ void tst_KDStlContainerAdaptor::vectorAdaptorIterators()
}

// For Qt5 (without C++17) and Qt6/C++17 compatibility
template <typename T> struct AddConst { typedef const T type; };
template <typename T> constexpr typename AddConst<T>::type &asConst(T &t) noexcept { return t; }
template <typename T> void asConst(const T &&) = delete; // prevent rvalue arguments
template<typename T>
struct AddConst
{
typedef const T type;
};
template<typename T>
constexpr typename AddConst<T>::type &asConst(T &t) noexcept
{
return t;
}
template<typename T>
void asConst(const T &&) = delete; // prevent rvalue arguments

void tst_KDStlContainerAdaptor::vectorAdaptorDataAccess()
{
Expand Down

0 comments on commit 97c2f49

Please sign in to comment.