Skip to content
Snippets Groups Projects
Commit 65585764 authored by Simon Praetorius's avatar Simon Praetorius
Browse files

Merge branch 'feature/support-msvc-partial' into 'master'

Improve (partial) support with MSVC

See merge request !1442
parents 62286c7b 2b6444da
2 merge requests!1470Fix wrong variable name to make target hash (2.10),!1442Improve (partial) support with MSVC
Pipeline #73796 waiting for manual action
......@@ -79,12 +79,23 @@ namespace Dune
/*
* Everybody else gets the standard treatment.
*/
#if defined(_MSC_VER)
pointer ret = static_cast<pointer>(_aligned_malloc(alignment, size));
#else
pointer ret = static_cast<pointer>(std::aligned_alloc(alignment, size));
#endif
if (!ret)
throw std::bad_alloc();
return ret;
}
#if defined(_MSC_VER)
void deallocate(pointer p, [[maybe_unused]] size_type n)
{
_aligned_free(p);
}
#endif
};
}
......
......@@ -243,9 +243,7 @@ struct DExtentsImpl;
template <class IndexType, std::size_t... I>
struct DExtentsImpl<IndexType, std::integer_sequence<std::size_t,I...>>
{
template <std::size_t>
using dynamic = std::integral_constant<std::size_t,Std::dynamic_extent>;
using type = Std::extents<IndexType, dynamic<I>::value...>;
using type = Std::extents<IndexType, (void(I), Std::dynamic_extent)...>;
};
} // end namespace Impl
......
......@@ -23,7 +23,7 @@ namespace Dune {
struct AutonomousValueType<ZeroExpr> { using type = int; };
// doAutoCopy should not pick up this overload
constexpr auto autoCopy(ZeroExpr) = delete;
auto autoCopy(ZeroExpr) = delete;
} // namespace Dune
int main()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment