Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions include/igl/FastWindingNumberForSoups.h
Original file line number Diff line number Diff line change
Expand Up @@ -2035,13 +2035,15 @@ class UT_Array
{ T *data = myData; myData = newdata; return data; }

template <typename IT, bool FORWARD>
class base_iterator :
public std::iterator<std::random_access_iterator_tag, T, exint>
class base_iterator
{
public:
typedef IT& reference;
typedef IT* pointer;

using iterator_category = std::random_access_iterator_tag;
using value_type = IT;
using difference_type = exint;
using pointer = value_type *;
using reference = value_type &;

// Note: When we drop gcc 4.4 support and allow range-based for
// loops, we should also drop atEnd(), which means we can drop
// myEnd here.
Expand Down Expand Up @@ -2287,7 +2289,11 @@ class UT_Array
// use the SYS_DECLARE_IS_POD() macro in SYS_TypeDecorate.h.
static constexpr SYS_FORCE_INLINE bool isPOD()
{
return std::is_pod<T>::value;
return std::is_standard_layout<T>::value &&
std::is_trivially_default_constructible<T>::value &&
std::is_trivially_copyable<T>::value &&
std::is_trivially_move_assignable<T>::value &&
std::is_trivially_destructible<T>::value;
}

/// Implements both append(const T &) and append(T &&) via perfect
Expand Down Expand Up @@ -3924,7 +3930,9 @@ struct Box {

template<typename S>
SYS_FORCE_INLINE Box(const Box<S,NAXES>& other) noexcept {
static_assert((std::is_pod<Box<T,NAXES>>::value) || !std::is_pod<T>::value,
static_assert(
(std::is_standard_layout<Box<T,NAXES>>::value && std::is_trivially_copyable<Box<T,NAXES>>::value && std::is_trivially_default_constructible<Box<T,NAXES>>::value) ||
!(std::is_standard_layout<T>::value && std::is_trivially_copyable<T>::value && std::is_trivially_default_constructible<T>::value),
"UT::Box should be POD, for better performance in UT_Array, etc.");

for (uint axis = 0; axis < NAXES; ++axis) {
Expand Down
Loading