1

I did the steps described here with MSVC2022 and was able to do:

import std.core;

but not

import std;

what is the difference? What is this std.core?

Some programmer dude
  • 400,186
  • 35
  • 402
  • 621
Alexey Starinsky
  • 3,699
  • 3
  • 21
  • 57
  • 8
    `import std;` is a C++23 feature, that AFAIK no compiler has yet implemented. `import std.core;` is a Microsoft specific module – UnholySheep Jul 28 '22 at 20:27
  • 1
    Interesting. Welcome back `bits/stdc++.h`. – Paul Sanders Jul 28 '22 at 20:34
  • 2
    See [Overview of modules in C++](https://learn.microsoft.com/en-us/cpp/cpp/modules-cpp?view=msvc-170) on MSDN, in particulaar [Consume the C++ Standard Library as modules](https://learn.microsoft.com/en-us/cpp/cpp/modules-cpp?view=msvc-170#consume-the-c-standard-library-as-modules), which describes the `std.core` module – Remy Lebeau Jul 28 '22 at 21:11

1 Answers1

0

I suggest you read this issue carefully, the problem is similar to yours.

And usually, In MSVS std refers to namespace, you could use the contents of std by adding using namespace std;, such as std::cout, etc.

Yujian Yao - MSFT
  • 945
  • 1
  • 3
  • 9