Skip to content

Commit

Permalink
Try to fix include guards for trivially copyable in vprgba/vprgbf
Browse files Browse the repository at this point in the history
  • Loading branch information
SamFlt committed Sep 19, 2024
1 parent 61856bf commit 1ca277f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions modules/core/include/visp3/core/vpRGBa.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#include <visp3/core/vpConfig.h>
#include <visp3/core/vpColVector.h>

#if (VISP_CXX_STANDARD > VISP_CXX_STANDARD_98)
#if ((__cplusplus >= 201703L) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201703L)))
#include <type_traits>
#endif

Expand Down Expand Up @@ -177,7 +177,7 @@ class VISP_EXPORT vpRGBa
friend VISP_EXPORT vpRGBa operator*(const double &x, const vpRGBa &rgb);
};

#if (VISP_CXX_STANDARD > VISP_CXX_STANDARD_98)
#if ((__cplusplus >= 201703L) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201703L)))
static_assert(std::is_trivially_assignable_v<vpRGBa, vpRGBa>);
static_assert(std::is_trivially_copyable_v<vpRGBa>);
#endif
Expand Down
4 changes: 2 additions & 2 deletions modules/core/include/visp3/core/vpRGBf.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include <visp3/core/vpConfig.h>
#include <visp3/core/vpColVector.h>

#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_17)
#if ((__cplusplus >= 201703L) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201703L)))
#include <type_traits>
#endif

Expand Down Expand Up @@ -149,7 +149,7 @@ class VISP_EXPORT vpRGBf
friend VISP_EXPORT vpRGBf operator*(float x, const vpRGBf &rgb);
};

#if (VISP_CXX_STANDARD > VISP_CXX_STANDARD_98)
#if ((__cplusplus >= 201703L) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201703L)))
static_assert(std::is_trivially_assignable_v<vpRGBf, vpRGBf>);
static_assert(std::is_trivially_copyable_v<vpRGBf>);
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ class VISP_EXPORT vpRBProbabilistic3DDriftDetector : public vpRBDriftDetector
computeStddev();
}



/**
* \brief Update the color distribution with a new sample c.
*
Expand Down

0 comments on commit 1ca277f

Please sign in to comment.