Skip to content

VisualStudio is unable to compile mathplot #149

Description

@sebsjames

VisualStudio (both the "Windows 2022" github runner version and the "Windows 2025" github runner version) chokes on some code that I believe to be valid C++.

The file is VisualOwnable.cppm and the error message is:

D:\a\mathplot\mathplot\mplot\VisualOwnable.cppm(1067,27): error C2079: 'fout' uses undefined class 'std::basic_ofstream<char,std::char_traits<char>>' [D:\a\mathplot\mathplot\build\examples\anneal_asa.vcxproj]
  (compiling source file '../../examples/anneal_asa.cpp')
      D:\a\mathplot\mathplot\mplot\VisualOwnable.cppm(1067,27):
      the template instantiation context (the oldest one first) is
          D:\a\mathplot\mathplot\examples\anneal_asa.cpp(101,21):
          see reference to class template instantiation 'mplot::Visual<262145>' being compiled
          D:\a\mathplot\mathplot\mplot\Visual.cppm(59,34):
          see reference to class template instantiation 'mplot::VisualOwnable<262145>' being compiled
          D:\a\mathplot\mathplot\mplot\VisualOwnable.cppm(1065,22):
          while compiling class template member function 'void mplot::VisualOwnable<262145>::savegltf(const std::string &)'

I've yet to try to make a report on this to Microsoft.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions