<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Simple code compiles with latest visual studio C++ compiler but not with Intel 2025 C++ compiler in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Simple-code-compiles-with-latest-visual-studio-C-compiler-but/m-p/1706750#M4513</link>
    <description>&lt;P&gt;I have a simple code : in toto.ixx file :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;module;

#include &amp;lt;iostream&amp;gt;
#include &amp;lt;typeinfo&amp;gt;
#include &amp;lt;utility&amp;gt;

export module math;

template &amp;lt;typename T&amp;gt;
auto showType(T&amp;amp;&amp;amp;t)
{
    return typeid(std::forward&amp;lt;T&amp;gt;(t)).name();
}

export namespace math
{
    template &amp;lt;typename T, typename T2&amp;gt;
    auto sum(T fir, T2 sec)
    {
        auto res = fir + sec;
        return std::make_pair(res, showType(res));
    }
}&lt;/LI-CODE&gt;&lt;P&gt;and in ConsoleApplication3.cpp :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;iostream&amp;gt;
import math;

int main()
{
    auto [val, message] = math::sum(2000, 3.14159);
    std::cout &amp;lt;&amp;lt; "math::sum(2000, 11) : " &amp;lt;&amp;lt; val &amp;lt;&amp;lt; "; type: " &amp;lt;&amp;lt; message &amp;lt;&amp;lt; '\n';
}&lt;/LI-CODE&gt;&lt;P&gt;This compiles and executes fine with latest Visual Studio Professional 2022 C++ compiler while it doesn't compile with Intel C++ 2025 compiler, the build output being :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="none"&gt;1&amp;gt;------ Build started: Project: ConsoleApplication3, Configuration: Debug x64 ------
1&amp;gt;C:\pah\to\solutions\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.cpp(2,8): : error : module 'math' not found
1&amp;gt;    2 | import math;
1&amp;gt;      | ~~~~~~~^~~~
1&amp;gt;1 error generated.
1&amp;gt;Done building project "ConsoleApplication3.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 17:32 and took 02.479 seconds ==========&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course "Preview - Features from the Latest C++ Working Draft (/std:c++latest)" is activated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is happening ?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Jul 2025 15:37:13 GMT</pubDate>
    <dc:creator>Olórin</dc:creator>
    <dc:date>2025-07-31T15:37:13Z</dc:date>
    <item>
      <title>Simple code compiles with latest visual studio C++ compiler but not with Intel 2025 C++ compiler</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Simple-code-compiles-with-latest-visual-studio-C-compiler-but/m-p/1706750#M4513</link>
      <description>&lt;P&gt;I have a simple code : in toto.ixx file :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;module;

#include &amp;lt;iostream&amp;gt;
#include &amp;lt;typeinfo&amp;gt;
#include &amp;lt;utility&amp;gt;

export module math;

template &amp;lt;typename T&amp;gt;
auto showType(T&amp;amp;&amp;amp;t)
{
    return typeid(std::forward&amp;lt;T&amp;gt;(t)).name();
}

export namespace math
{
    template &amp;lt;typename T, typename T2&amp;gt;
    auto sum(T fir, T2 sec)
    {
        auto res = fir + sec;
        return std::make_pair(res, showType(res));
    }
}&lt;/LI-CODE&gt;&lt;P&gt;and in ConsoleApplication3.cpp :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;iostream&amp;gt;
import math;

int main()
{
    auto [val, message] = math::sum(2000, 3.14159);
    std::cout &amp;lt;&amp;lt; "math::sum(2000, 11) : " &amp;lt;&amp;lt; val &amp;lt;&amp;lt; "; type: " &amp;lt;&amp;lt; message &amp;lt;&amp;lt; '\n';
}&lt;/LI-CODE&gt;&lt;P&gt;This compiles and executes fine with latest Visual Studio Professional 2022 C++ compiler while it doesn't compile with Intel C++ 2025 compiler, the build output being :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="none"&gt;1&amp;gt;------ Build started: Project: ConsoleApplication3, Configuration: Debug x64 ------
1&amp;gt;C:\pah\to\solutions\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.cpp(2,8): : error : module 'math' not found
1&amp;gt;    2 | import math;
1&amp;gt;      | ~~~~~~~^~~~
1&amp;gt;1 error generated.
1&amp;gt;Done building project "ConsoleApplication3.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 17:32 and took 02.479 seconds ==========&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course "Preview - Features from the Latest C++ Working Draft (/std:c++latest)" is activated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is happening ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2025 15:37:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Simple-code-compiles-with-latest-visual-studio-C-compiler-but/m-p/1706750#M4513</guid>
      <dc:creator>Olórin</dc:creator>
      <dc:date>2025-07-31T15:37:13Z</dc:date>
    </item>
  </channel>
</rss>

