Совместимость с Смоленск 1.5
This commit is contained in:
parent
8d4aebdee2
commit
10d1597d25
23
include/myx-example-features/private/qasconst.hpp
Normal file
23
include/myx-example-features/private/qasconst.hpp
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef MYX_BACKPORTS_QASCONST_HPP_
|
||||
#define MYX_BACKPORTS_QASCONST_HPP_
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
#if QT_VERSION < 0x050700
|
||||
|
||||
template < typename T >
|
||||
Q_DECL_CONSTEXPR typename std::add_const< T >::type& qAsConst( T& t ) noexcept
|
||||
{
|
||||
return( t );
|
||||
}
|
||||
|
||||
|
||||
// prevent rvalue arguments:
|
||||
template < typename T >
|
||||
void qAsConst( const T&& ) = delete;
|
||||
|
||||
#endif // if QT_VERSION < 0x050700
|
||||
|
||||
#endif // ifndef MYX_BACKPORTS_QASCONST_HPP_
|
@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
#include <myx-example-features/processor.hpp>
|
||||
#include <myx-example-features/private/qasconst.hpp>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user