[libcxx] [test] Need to include <memory> for std::unique_ptr.
Fixes MSVC "error C2039: 'unique_ptr': is not a member of 'std'".
Differential D19698
[libcxx] [test] Need to include <memory> for std::unique_ptr. STL_MSFT on Apr 28 2016, 5:09 PM. Authored by
Details
[libcxx] [test] Need to include <memory> for std::unique_ptr. Fixes MSVC "error C2039: 'unique_ptr': is not a member of 'std'".
Diff Detail Event TimelineComment Actions It'll be good idea to run Include What You Use to make sure that all dependencies are explicit. Comment Actions You can also remove all the export *s from the module map and try running the testsuite with modules enabled for a nasty shock about how common this problem is... Comment Actions Most tests pretty much rely on <type_traits> getting dragged in indirectly, same thing with <memory> and the bits of <utility> we actually define in <type_traits>. I was hoping that maybe "Include What You Use" had a fix-it mode. I'll look into this further tonight. Comment Actions
It has fix_includes.py script, but I encountered quite a lot of false positives, so I prefer to fix problems manually. Comment Actions There are also a few symbols that libc++ defines in the wrong header and then #includes into the right one. Any automated fix is going to mess up on those. Comment Actions Ah, I stupidly assumed that the automatic fix would handle "std::" symbols based off of the spec and not the implementation. |