r/cpp • u/Expert_Sheepherder24 • 1d ago
MSVC automatic import std::vector bug
https://developercommunity.visualstudio.com/t/MSVC-C20-modules-expose-std::vector-on/11135469?sort=newest&scope=follow//math.ixx
module;
#include <vector>
export module math;
//nothing is exported
//main.cpp Vs2026 18.9.2
import math;
int main()
{
std::vector<char> value = { 'a', 'b', 'c'}; // OK, but why?
return 0;
}
3
Upvotes
View all comments
5
u/manni66 22h ago
produces the expected error message: "error C2039: 'vector': is not a member of 'std'"