arch 32 piswap fixes
This commit is contained in:
@@ -302,7 +302,11 @@ template<> inline void piSwapBinary(const void *& f, const void *& s) {
|
|||||||
|
|
||||||
template<> inline void piSwap(double & f, double & s) {piSwapBinary<double>(f, s);}
|
template<> inline void piSwap(double & f, double & s) {piSwapBinary<double>(f, s);}
|
||||||
template<> inline void piSwap(ldouble & f, ldouble & s) {piSwapBinary<ldouble>(f, s);}
|
template<> inline void piSwap(ldouble & f, ldouble & s) {piSwapBinary<ldouble>(f, s);}
|
||||||
|
#ifdef ARCH_BITS_32
|
||||||
|
template<> inline void piSwap(float & f, float & s) {piSwapBinary<float>(f, s);}
|
||||||
|
template<> inline void piSwap(llong & f, llong & s) {piSwapBinary<llong>(f, s);}
|
||||||
|
template<> inline void piSwap(ullong & f, ullong & s) {piSwapBinary<ullong>(f, s);}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*! \brief Function for compare two values without "=" by raw content
|
/*! \brief Function for compare two values without "=" by raw content
|
||||||
* \details Example:\n \snippet piincludes.cpp compareBinary */
|
* \details Example:\n \snippet piincludes.cpp compareBinary */
|
||||||
|
|||||||
@@ -24,13 +24,14 @@
|
|||||||
#define PIP_CXX11_SUPPORT
|
#define PIP_CXX11_SUPPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
|
|
||||||
# define WINDOWS
|
|
||||||
# define ARCH_BITS_32
|
|
||||||
#endif
|
|
||||||
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__)
|
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__)
|
||||||
# define WINDOWS
|
# define WINDOWS
|
||||||
# define ARCH_BITS_64
|
# define ARCH_BITS_64
|
||||||
|
#else
|
||||||
|
# if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
|
||||||
|
# define WINDOWS
|
||||||
|
# define ARCH_BITS_32
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#if defined(__QNX__) || defined(__QNXNTO__)
|
#if defined(__QNX__) || defined(__QNXNTO__)
|
||||||
# define QNX
|
# define QNX
|
||||||
|
|||||||
6
main.cpp
6
main.cpp
@@ -119,8 +119,10 @@ struct A {
|
|||||||
|
|
||||||
void swap(int & x, int & y) {int t = x; x = y; y = t;}
|
void swap(int & x, int & y) {int t = x; x = y; y = t;}
|
||||||
void swap2(int & x, int & y) {int t(std::move(x)); x = y; y = t;}
|
void swap2(int & x, int & y) {int t(std::move(x)); x = y; y = t;}
|
||||||
void swap(size_t & x, size_t & y) {size_t t = x; x = y; y = t;}
|
void swap(ullong & x, ullong & y) {ullong t = x; x = y; y = t;}
|
||||||
void swap2(size_t & x, size_t & y) {size_t t{std::move(x)}; x = y; y = t;}
|
void swap2(ullong & x, ullong & y) {ullong t{std::move(x)}; x = y; y = t;}
|
||||||
|
void swap(llong & x, llong & y) {llong t = x; x = y; y = t;}
|
||||||
|
void swap2(llong & x, llong & y) {llong t{std::move(x)}; x = y; y = t;}
|
||||||
void swap(double & x, double & y) {double t = x; x = y; y = t;}
|
void swap(double & x, double & y) {double t = x; x = y; y = t;}
|
||||||
void swap2(double & x, double & y) {double t(std::move(x)); x = std::move(y); y = std::move(t);}
|
void swap2(double & x, double & y) {double t(std::move(x)); x = std::move(y); y = std::move(t);}
|
||||||
void swap(float & x, float & y) {float t = x; x = y; y = t;}
|
void swap(float & x, float & y) {float t = x; x = y; y = t;}
|
||||||
|
|||||||
Reference in New Issue
Block a user