Uh oh!
There was an error while loading. Please reload this page.
Use init rather than ms extension syntax - #55475
Conversation
am11
commented
Jul 11, 2021
With decltype, it apparently didn't clear head/tail or re-instantiated the list which was corrupting crossgen2. I have added a debug-only init method to simplify things. |
@am11 would doing a placement new + decltype work instead of adding the Init method? Something like the following: new (&ig->igBlocks) decltype(ig->igBlocks)(emitComp->getAllocator(CMK_LoopOpt))
|
f3f14dd to
8e60c0dCompaream11
commented
Jul 11, 2021
Indeed, it is much cleaner. I was too pressed on making explicit ctor work with decltype, didn't thought of other (size_t) ctros. :) |
am11
commented
Jul 11, 2021
Looks like MSVC didn't resolve the correct type with decltype (it is resolving the type of Allocator rather than list<T,Allocator>). |
am11
commented
Jul 11, 2021
Reverted to init approach for now, which makes all compilers happy. :) |
BruceForstall
left a comment
There was a problem hiding this comment.
init shouldn't really be under DEBUG, but that's fine for now.
Sorry for the trouble...
Fixes gcc build.
Clang also gives the error as gcc when calling ctor function explicitly, but clang emits warning with
-fms-extensions:gcc just does not support this extension (even with
-fms-extensions). So lets fix it by rewriting it in ISO C++ syntax.cc @BruceForstall, @janvorli