Commit 1b677077 authored by Harris Hancock's avatar Harris Hancock

Remove MSVC default assignment workaround

This seems to work now in VS2015, and its presence causes assumption
failures (static assertions) in dynamic.c++.
parent 8c32ba4a
...@@ -627,18 +627,6 @@ private: ...@@ -627,18 +627,6 @@ private:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
#if _MSC_VER
// TODO(msvc): MSVC insists List{Reader,Builder}::operator= are deleted unless we
// define them explicitly. Don't know why, especially for the readers.
#define MSVC_DEFAULT_ASSIGNMENT_WORKAROUND(const_, type) \
inline type& operator=(const_ type& other) { \
memcpy(this, &other, sizeof(*this)); \
return *this; \
}
#else
#define MSVC_DEFAULT_ASSIGNMENT_WORKAROUND(const_, type)
#endif
class ListBuilder: public kj::DisallowConstCopy { class ListBuilder: public kj::DisallowConstCopy {
public: public:
inline explicit ListBuilder(ElementSize elementSize) inline explicit ListBuilder(ElementSize elementSize)
...@@ -646,8 +634,6 @@ public: ...@@ -646,8 +634,6 @@ public:
step(0 * BITS / ELEMENTS), elementSize(elementSize), structDataSize(0 * BITS), step(0 * BITS / ELEMENTS), elementSize(elementSize), structDataSize(0 * BITS),
structPointerCount(0 * POINTERS) {} structPointerCount(0 * POINTERS) {}
MSVC_DEFAULT_ASSIGNMENT_WORKAROUND(, ListBuilder)
inline word* getLocation() { inline word* getLocation() {
// Get the object's location. // Get the object's location.
...@@ -732,8 +718,6 @@ public: ...@@ -732,8 +718,6 @@ public:
step(0 * BITS / ELEMENTS), structDataSize(0), structPointerCount(0), step(0 * BITS / ELEMENTS), structDataSize(0), structPointerCount(0),
elementSize(elementSize), nestingLimit(0x7fffffff) {} elementSize(elementSize), nestingLimit(0x7fffffff) {}
MSVC_DEFAULT_ASSIGNMENT_WORKAROUND(const, ListReader)
inline ElementCount size() const; inline ElementCount size() const;
// The number of elements in the list. // The number of elements in the list.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment