Skip to content

Commit

Permalink
Work around (apparent) MSVC 2019 v16.11 bug
Browse files Browse the repository at this point in the history
Via @pierremoreau. Fixes issue #140.
  • Loading branch information
mmp committed Jun 11, 2021
1 parent 78691d0 commit 3ca428d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pbrt/util/pstd.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,13 @@ class span {

// Explicit reference constructor for a mutable `span<T>` type. Can be
// replaced with Makespan() to infer the type parameter.
template <typename V, typename = EnableIfConvertibleFrom<V>,
typename = EnableIfMutableView<V>>
template <typename V, typename X = EnableIfConvertibleFrom<V>,
typename Y = EnableIfMutableView<V>>
PBRT_CPU_GPU explicit span(V &v) noexcept : span(v.data(), v.size()) {}

// Implicit reference constructor for a read-only `span<const T>` type
template <typename V, typename = EnableIfConvertibleFrom<V>,
typename = EnableIfConstView<V>>
template <typename V, typename X = EnableIfConvertibleFrom<V>,
typename Y = EnableIfConstView<V>>
PBRT_CPU_GPU constexpr span(const V &v) noexcept : span(v.data(), v.size()) {}

PBRT_CPU_GPU
Expand Down

0 comments on commit 3ca428d

Please sign in to comment.