Skip to content

Commit

Permalink
traits c++17 simpler syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Aug 26, 2018
1 parent 42a4b58 commit 4c92684
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions libs/hwdrivers/include/mrpt/hwdrivers/CDUO3DCamera.h
Expand Up @@ -250,8 +250,8 @@ class CDUO3DCamera


}; // End of class }; // End of class


static_assert(!std::is_copy_constructible<CDUO3DCamera>::value, "Copy Check"); static_assert(!std::is_copy_constructible_v<CDUO3DCamera>, "Copy Check");
static_assert(!std::is_copy_assignable<CDUO3DCamera>::value, "Assign Check"); static_assert(!std::is_copy_assignable_v<CDUO3DCamera>, "Assign Check");
} }
#endif #endif


Expand Down
4 changes: 2 additions & 2 deletions libs/hwdrivers/include/mrpt/hwdrivers/CGenericSensor.h
Expand Up @@ -297,8 +297,8 @@ class CGenericSensor
}; // end of class }; // end of class


static_assert( static_assert(
!std::is_copy_constructible<CGenericSensor>::value && !std::is_copy_constructible_v<CGenericSensor> &&
!std::is_copy_assignable<CGenericSensor>::value, !std::is_copy_assignable_v<CGenericSensor>,
"Copy Check"); "Copy Check");


#define SENSOR_CLASS_ID(class_name) \ #define SENSOR_CLASS_ID(class_name) \
Expand Down
Expand Up @@ -280,8 +280,8 @@ class CImageGrabber_FlyCapture2
inline bool isStereo() { return m_options.stereo_mode; } inline bool isStereo() { return m_options.stereo_mode; }
}; // End of class }; // End of class
static_assert( static_assert(
!std::is_copy_constructible<CImageGrabber_FlyCapture2>::value && !std::is_copy_constructible_v<CImageGrabber_FlyCapture2> &&
!std::is_copy_assignable<CImageGrabber_FlyCapture2>::value, !std::is_copy_assignable_v<CImageGrabber_FlyCapture2>,
"Copy Check"); "Copy Check");
} }
#endif #endif
Expand Down
Expand Up @@ -69,8 +69,8 @@ class CStereoGrabber_Bumblebee_libdc1394
bool m_bInitialized; bool m_bInitialized;
}; // End of class }; // End of class
static_assert( static_assert(
!std::is_copy_constructible<CStereoGrabber_Bumblebee_libdc1394>::value && !std::is_copy_constructible_v<CStereoGrabber_Bumblebee_libdc1394> &&
!std::is_copy_assignable<CStereoGrabber_Bumblebee_libdc1394>::value, !std::is_copy_assignable_v<CStereoGrabber_Bumblebee_libdc1394>,
"Copy Check"); "Copy Check");
} }


4 changes: 2 additions & 2 deletions libs/hwdrivers/include/mrpt/hwdrivers/CStereoGrabber_SVS.h
Expand Up @@ -114,8 +114,8 @@ class CStereoGrabber_SVS


}; // End of class }; // End of class
static_assert( static_assert(
!std::is_copy_constructible<CStereoGrabber_SVS>::value && !std::is_copy_constructible_v<CStereoGrabber_SVS> &&
!std::is_copy_assignable<CStereoGrabber_SVS>::value, !std::is_copy_assignable_v<CStereoGrabber_SVS>,
"Copy Check"); "Copy Check");
} }
#endif #endif
Expand Down
4 changes: 2 additions & 2 deletions libs/io/include/mrpt/io/CFileGZOutputStream.h
Expand Up @@ -69,8 +69,8 @@ class CFileGZOutputStream : public CStream
size_t Write(const void* Buffer, size_t Count) override; size_t Write(const void* Buffer, size_t Count) override;
}; // End of class def. }; // End of class def.
static_assert( static_assert(
!std::is_copy_constructible<CFileGZOutputStream>::value && !std::is_copy_constructible_v<CFileGZOutputStream> &&
!std::is_copy_assignable<CFileGZOutputStream>::value, !std::is_copy_assignable_v<CFileGZOutputStream>,
"Copy Check"); "Copy Check");
} }


4 changes: 2 additions & 2 deletions libs/io/include/mrpt/io/CFileOutputStream.h
Expand Up @@ -76,8 +76,8 @@ class CFileOutputStream : public CStream
size_t Write(const void* Buffer, size_t Count) override; size_t Write(const void* Buffer, size_t Count) override;
}; // End of class def. }; // End of class def.
static_assert( static_assert(
!std::is_copy_constructible<CFileOutputStream>::value && !std::is_copy_constructible_v<CFileOutputStream> &&
!std::is_copy_assignable<CFileOutputStream>::value, !std::is_copy_assignable_v<CFileOutputStream>,
"Copy Check"); "Copy Check");
} }


4 changes: 2 additions & 2 deletions libs/io/include/mrpt/io/CPipe.h
Expand Up @@ -114,8 +114,8 @@ class CPipeBaseEndPoint : public mrpt::io::CStream
virtual uint64_t getPosition() const override; virtual uint64_t getPosition() const override;
}; // end of CPipeBaseEndPoint }; // end of CPipeBaseEndPoint
static_assert( static_assert(
!std::is_copy_constructible<CPipeBaseEndPoint>::value && !std::is_copy_constructible_v<CPipeBaseEndPoint> &&
!std::is_copy_assignable<CPipeBaseEndPoint>::value, !std::is_copy_assignable_v<CPipeBaseEndPoint>,
"Copy Check"); "Copy Check");


/** The read end-point in a pipe created with mrpt::synch::CPipe. /** The read end-point in a pipe created with mrpt::synch::CPipe.
Expand Down
4 changes: 2 additions & 2 deletions libs/io/src/CFileGZInputStream.cpp
Expand Up @@ -19,8 +19,8 @@ using namespace mrpt::io;
using namespace std; using namespace std;


static_assert( static_assert(
!std::is_copy_constructible<CFileGZInputStream>::value && !std::is_copy_constructible_v<CFileGZInputStream> &&
!std::is_copy_assignable<CFileGZInputStream>::value, !std::is_copy_assignable_v<CFileGZInputStream>,
"Copy Check"); "Copy Check");


#define THE_GZFILE reinterpret_cast<gzFile>(m_f) #define THE_GZFILE reinterpret_cast<gzFile>(m_f)
Expand Down
4 changes: 2 additions & 2 deletions libs/io/src/CFileInputStream.cpp
Expand Up @@ -16,8 +16,8 @@ using namespace mrpt::io;
using namespace std; using namespace std;


static_assert( static_assert(
!std::is_copy_constructible<CFileInputStream>::value && !std::is_copy_constructible_v<CFileInputStream> &&
!std::is_copy_assignable<CFileInputStream>::value, !std::is_copy_assignable_v<CFileInputStream>,
"Copy Check"); "Copy Check");


CFileInputStream::CFileInputStream(const string& fileName) : m_if() CFileInputStream::CFileInputStream(const string& fileName) : m_if()
Expand Down
4 changes: 2 additions & 2 deletions libs/io/src/CFileStream.cpp
Expand Up @@ -18,8 +18,8 @@ using namespace mrpt::io;
using namespace std; using namespace std;


static_assert( static_assert(
!std::is_copy_constructible<CFileStream>::value && !std::is_copy_constructible_v<CFileStream> &&
!std::is_copy_assignable<CFileStream>::value, !std::is_copy_assignable_v<CFileStream>,
"Copy Check"); "Copy Check");


/*--------------------------------------------------------------- /*---------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions libs/math/include/mrpt/math/CSparseMatrix.h
Expand Up @@ -498,8 +498,8 @@ class CSparseMatrix
void update(const CSparseMatrix& new_SM); void update(const CSparseMatrix& new_SM);
}; };
static_assert( static_assert(
!std::is_copy_constructible<CholeskyDecomp>::value && !std::is_copy_constructible_v<CholeskyDecomp> &&
!std::is_copy_assignable<CholeskyDecomp>::value, !std::is_copy_assignable_v<CholeskyDecomp>,
"Copy Check"); "Copy Check");


/** @} */ /** @} */
Expand Down
4 changes: 2 additions & 2 deletions libs/system/src/CTicTac.cpp
Expand Up @@ -22,8 +22,8 @@


#include <type_traits> #include <type_traits>
static_assert( static_assert(
!std::is_copy_constructible<mrpt::system::CTicTac>::value && !std::is_copy_constructible_v<mrpt::system::CTicTac> &&
!std::is_copy_assignable<mrpt::system::CTicTac>::value, !std::is_copy_assignable_v<mrpt::system::CTicTac>,
"Copy Check"); "Copy Check");


// For Windows: get the common code out of CTicTac so it's only run once! // For Windows: get the common code out of CTicTac so it's only run once!
Expand Down

0 comments on commit 4c92684

Please sign in to comment.