Commit 19763777 authored by Harris Hancock's avatar Harris Hancock

Remove MSVC exclusions from AnyStruct::Reader and OwnOwn

parent 801ae24d
...@@ -452,11 +452,9 @@ public: ...@@ -452,11 +452,9 @@ public:
Reader() = default; Reader() = default;
inline Reader(_::StructReader reader): _reader(reader) {} inline Reader(_::StructReader reader): _reader(reader) {}
#if !_MSC_VER // TODO(msvc): MSVC ICEs on this. Try restoring when compiler improves.
template <typename T, typename = kj::EnableIf<CAPNP_KIND(FromReader<T>) == Kind::STRUCT>> template <typename T, typename = kj::EnableIf<CAPNP_KIND(FromReader<T>) == Kind::STRUCT>>
inline Reader(T&& value) inline Reader(T&& value)
: _reader(_::PointerHelpers<FromReader<T>>::getInternalReader(kj::fwd<T>(value))) {} : _reader(_::PointerHelpers<FromReader<T>>::getInternalReader(kj::fwd<T>(value))) {}
#endif
kj::ArrayPtr<const byte> getDataSection() { kj::ArrayPtr<const byte> getDataSection() {
return _reader.getDataSectionAsBlob(); return _reader.getDataSectionAsBlob();
......
...@@ -208,15 +208,10 @@ class OwnOwn { ...@@ -208,15 +208,10 @@ class OwnOwn {
public: public:
inline OwnOwn(Own<T>&& value) noexcept: value(kj::mv(value)) {} inline OwnOwn(Own<T>&& value) noexcept: value(kj::mv(value)) {}
#if _MSC_VER
inline Own<T>& operator*() { return value; }
inline const Own<T>& operator*() const { return value; }
#else
inline Own<T>& operator*() & { return value; } inline Own<T>& operator*() & { return value; }
inline const Own<T>& operator*() const & { return value; } inline const Own<T>& operator*() const & { return value; }
inline Own<T>&& operator*() && { return kj::mv(value); } inline Own<T>&& operator*() && { return kj::mv(value); }
inline const Own<T>&& operator*() const && { return kj::mv(value); } inline const Own<T>&& operator*() const && { return kj::mv(value); }
#endif
inline Own<T>* operator->() { return &value; } inline Own<T>* operator->() { return &value; }
inline const Own<T>* operator->() const { return &value; } inline const Own<T>* operator->() const { return &value; }
inline operator Own<T>*() { return value ? &value : nullptr; } inline operator Own<T>*() { return value ? &value : nullptr; }
......
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