microsoft / GSL

Guidelines Support Library
Other
6.11k stars 736 forks source link

C++20 Modules Support? #1139

Closed Ariaszzzhc closed 8 months ago

Ariaszzzhc commented 9 months ago

At present, the C++ standard has advanced to C++23, and compilers such as gcc, clang, and msvs have already provided support for C++ standard modules, although the support may not be complete. May I ask if there are plans to support C++ modules in this project?

Maybe it will look like:

import microsoft.gsl;

int main() {
  gsl::owner<int> value{new int{1}};
  /* ... code ... */
  delete a;

  return 0;
}
soroshsabz commented 9 months ago

I think it is cool feature

grahamreeds commented 9 months ago

But does it serve the majority of users? We don't use it my current position but we did in a previous place and we were moving slowly to 2017 on a project by project basis (this was 2022).

No there are probably ways to get both imports and includes working together but does it ease or increase the burden on the maintainers?

GR

On Thu, 23 Nov 2023, 20:39 soroshsabz, @.***> wrote:

I think it is cool feature

— Reply to this email directly, view it on GitHub https://github.com/microsoft/GSL/issues/1139#issuecomment-1824885244, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGL3HEEJ6LQ67ELC3MWNADYF6X7FAVCNFSM6AAAAAA7PNDSA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRUHA4DKMRUGQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

hsutter commented 8 months ago

Maintainers call: Not at this time. We want this GSL implementation to work portably on all major compilers, so we're waiting for all the three major compilers have non-experimental support for modules.