Skip to content

Commit

Permalink
work around MSVC ICE
Browse files Browse the repository at this point in the history
  • Loading branch information
lightmare committed Feb 23, 2016
1 parent 5161d5b commit 84f16bb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/mapnik/image_view_any.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,18 @@ using image_view_base = util::variant<image_view_null,

struct MAPNIK_DECL image_view_any : image_view_base
{
#ifdef _MSC_VER
// TODO remove this when MSVC doesn't ICE with inherited constructor
// https://ci.appveyor.com/project/Mapbox/mapnik/build/1.0.670#L288
template <typename T>
image_view_any(T && data)
noexcept(std::is_nothrow_constructible<image_view_base, T && >::value)
: image_view_base(std::forward<T>(data)) {}
#else
// inherit constructors from variant, in particular conversions
// from alternatives
using image_view_base::image_view_base;
#endif

image_view_any() = default;

Expand Down

0 comments on commit 84f16bb

Please sign in to comment.