Compare commits

...

5 Commits

7 changed files with 19 additions and 14 deletions

View File

@ -47,5 +47,5 @@ if(MYXLIB_BUILD_EXAMPLES)
add_dependencies(${TRGT} create_auxilary_symlinks) add_dependencies(${TRGT} create_auxilary_symlinks)
# Правила для установки # Правила для установки
install(TARGETS ${TRGT} COMPONENT examples RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) # install(TARGETS ${TRGT} COMPONENT examples RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif() endif()

View File

@ -48,5 +48,5 @@ if(MYXLIB_BUILD_EXAMPLES)
add_dependencies(${TRGT} create_auxilary_symlinks) add_dependencies(${TRGT} create_auxilary_symlinks)
# Правила для установки # Правила для установки
install(TARGETS ${TRGT} COMPONENT examples RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) # install(TARGETS ${TRGT} COMPONENT examples RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif() endif()

View File

@ -55,5 +55,5 @@ if(MYXLIB_BUILD_EXAMPLES)
add_dependencies(${TRGT} create_auxilary_symlinks) add_dependencies(${TRGT} create_auxilary_symlinks)
# Правила для установки # Правила для установки
install(TARGETS ${TRGT} COMPONENT examples RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) # install(TARGETS ${TRGT} COMPONENT examples RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif() endif()

View File

@ -49,5 +49,5 @@ if(MYXLIB_BUILD_EXAMPLES)
add_dependencies(${TRGT} create_auxilary_symlinks) add_dependencies(${TRGT} create_auxilary_symlinks)
# Правила для установки # Правила для установки
install(TARGETS ${TRGT} COMPONENT examples RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) # install(TARGETS ${TRGT} COMPONENT examples RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif() endif()

View File

@ -4,6 +4,7 @@
#pragma once #pragma once
#if ( __cplusplus >= 201103L ) #if ( __cplusplus >= 201103L )
#include <memory>
#include <type_traits> #include <type_traits>
#endif #endif
@ -15,19 +16,25 @@ namespace std
template< class T > template< class T >
using underlying_type_t = typename std::underlying_type< T >::type; using underlying_type_t = typename std::underlying_type< T >::type;
template< typename T, typename ... Args >
std::unique_ptr< T > make_unique( Args&&... args )
{
return( std::unique_ptr< T >( new T( std::forward< Args >( args )... ) ) );
}
} // namespace std } // namespace std
#endif #endif
#if ( __cplusplus >= 201103L ) && ( __cplusplus < 201702L ) #if ( ( __cplusplus >= 201103L ) && ( __cplusplus < 201402L ) ) || \
( ( __cplusplus >= 201402L ) && ( __cplusplus < 201702L ) && defined( __STRICT_ANSI__ ) )
namespace std namespace std
{ {
#if defined( __STRICT_ANSI__ ) || ( __e2k__ )
template< typename ... Ts > struct make_void { typedef void type; }; template< typename ... Ts > struct make_void { typedef void type; };
template< typename ... Ts > using void_t = typename make_void< Ts... >::type; template< typename ... Ts > using void_t = typename make_void< Ts... >::type;
#endif
} // namespace std } // namespace std

View File

@ -3,10 +3,11 @@
#pragma once #pragma once
#if defined( QT_VERSION ) #if !defined( QT_VERSION )
#if QT_VERSION <= 0x050700
#include <QtGlobal> #include <QtGlobal>
#endif
#if ( QT_VERSION <= 0x050700 )
template< typename ... Args > template< typename ... Args >
struct QOverload struct QOverload
{ {
@ -29,9 +30,6 @@ Q_DECL_CONSTEXPR typename std::add_const< T >::type& qAsConst( T& t ) noexcept
template < typename T > template < typename T >
void qAsConst( const T&& ) = delete; void qAsConst( const T&& ) = delete;
#endif // if QT_VERSION <= 0x050700 #endif // if QT_VERSION <= 0x050700
#endif // if defined( QT_VERSION )
#endif // MYX_BACKPORTS_QT_COMMON_HPP_ #endif // MYX_BACKPORTS_QT_COMMON_HPP_

View File

@ -63,7 +63,7 @@ MYXLIB_INLINE void PosixSignalWatcherPrivate::watchForSignal( int signal )
#if MYX_QT_HAS_POSIX_SIGNALS #if MYX_QT_HAS_POSIX_SIGNALS
// Register a sigaction which will write to the socket pair // Register a sigaction which will write to the socket pair
struct sigaction sigact {}; struct sigaction sigact;
sigact.sa_handler = PosixSignalWatcherPrivate::signalHandler; //NOLINT sigact.sa_handler = PosixSignalWatcherPrivate::signalHandler; //NOLINT
sigact.sa_flags = 0; sigact.sa_flags = 0;
sigemptyset( &sigact.sa_mask ); sigemptyset( &sigact.sa_mask );