Skip to content

modules: ambiguous call to overloaded function #4090

Description

@larioteo

Describe the bug

As it seems there is a bug if you use export import std; in one module, than for example import <chrono>; in another. Now if you import these two modules in a third one, you get various errors depending on the used header unit in the second. I tried it with 'string', 'chrono' and 'print', but it seems that it doesn't matter which one I use.

Expected behavior

I'm not sure, I tried reimporting my modules, and the compiler doesn't seem to complain, so I think there should be no problem at all if you reimport std, or a header unit which it contains. I mean also with headers there was never such thing, thanks to '#pragma once'.

STL version

  • Option 1: Visual Studio v17.7.5 or Visual Studio v17.8 preview 3
    • Example:
      Microsoft Visual Studio Community 2022
      Version 17.7.5 |  v17.8 Preview 3.0
      

Additional context

I created a small project to reproduce this bug.
Test.zip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompilerCompiler work involvedmodulesC++23 modules, C++20 header unitsresolvedSuccessfully resolved without a commit

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions