Skip to content

Conversation

@hughbe
Copy link
Contributor

@hughbe hughbe commented Dec 2, 2016

  • MSVC can't infer decltype() when its used as a return type in an operator. Fixed by replacing the decltype with uint64_t
  • MSVC rejects sizeof(instance). Fixed by using sizeof(structType) instead
  • Control path warnings

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MSVC really doesn't support sizeof(value) in a static_assert?

Let's call it ModuleBits, I guess…

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem to support sizeof(value) well in many places. It's always happy with sizeof(TypeName) though...
I've renamed the struct as you suggested.

@jrose-apple
Copy link
Contributor

@swift-ci Please smoke test and merge

@hughbe
Copy link
Contributor Author

hughbe commented Dec 2, 2016

Strange CI error? looks like tests passed but ci couldn't merge

@jrose-apple jrose-apple merged commit dfa9536 into swiftlang:master Dec 2, 2016
@hughbe hughbe deleted the serialization-msvc branch December 2, 2016 21:13
class Serialized {
private:
using RawBitOffset = decltype(DeclTypeCursor.GetCurrentBitNo());
using RawBitOffset = uint64_t;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very strange bug - only occurs with nested generic classes - https://connect.microsoft.com/VisualStudio/feedback/details/3116520

unsigned : 0;
} Bits = {};
static_assert(sizeof(Bits) <= 8, "The bit set should be small");
static_assert(sizeof(ModuleBits) <= 8, "The bit set should be small");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants