Fixing build on Win and OSX

This commit is contained in:
tamasmeszaros 2019-05-20 11:19:43 +02:00
parent 38d54d779a
commit 4e2ef09a50
5 changed files with 65 additions and 25 deletions

View file

@ -4,6 +4,8 @@
#include <ostream>
#include <memory>
#include <vector>
#include <array>
#include <utility>
#include <cstdint>
namespace ClipperLib { struct Polygon; }
@ -27,22 +29,20 @@ public:
const uint8_t * data() { return m_buffer.data(); }
RawBytes(const RawBytes&) = delete;
RawBytes(RawBytes&&) = default;
RawBytes& operator=(const RawBytes&) = delete;
RawBytes& operator=(RawBytes&&) = default;
// /////////////////////////////////////////////////////////////////////////
// FIXME: the following is needed for MSVC2013 compatibility
// /////////////////////////////////////////////////////////////////////////
// RawBytes(const RawBytes&) = delete;
// RawBytes(RawBytes&& mv) : m_buffer(std::move(mv.m_buffer)) {}
// RawBytes(RawBytes&&) = default;
// RawBytes& operator=(RawBytes&&) = default;
// RawBytes& operator=(const RawBytes&) = delete;
// RawBytes& operator=(RawBytes&& mv) {
// m_buffer = std::move(mv.m_buffer);
// return *this;
// }
RawBytes(RawBytes&& mv) : m_buffer(std::move(mv.m_buffer)) {}
RawBytes& operator=(RawBytes&& mv) {
m_buffer = std::move(mv.m_buffer);
return *this;
}
// /////////////////////////////////////////////////////////////////////////
};
@ -92,7 +92,6 @@ public:
reset(std::forward<Args>(args)...);
}
Raster();
Raster(const Raster& cpy) = delete;
Raster& operator=(const Raster& cpy) = delete;
Raster(Raster&& m);
@ -141,6 +140,10 @@ public:
RawBytes save();
};
// This prevents the duplicate default constructor warning on MSVC2013
template<> Raster::Raster();
} // sla
} // Slic3r