<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - concepts-related information does not propogated through precompiled headers"
   href="https://bugs.llvm.org/show_bug.cgi?id=45113">45113</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>concepts-related information does not propogated through precompiled headers
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>10.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++2a
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>vopl@bk.ru
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat pch.hpp
void f(int=0) requires true {}
void f(char='0') requires false {}

$ cat main.cpp 
//clang++ -std=gnu++2a pch.hpp -o pch.hpp.pch
//clang++ -std=gnu++2a -include-pch pch.hpp.pch -c main.cpp

#include "pch.hpp"

int main()
{
    f();
    return 0;
}

# try compile main.cpp WITHOUT precompiled headers
$ clang++ -std=gnu++2a -c main.cpp && echo OK
OK
$
$
$# try compile main.cpp WITH precompiled headers - fail
$ clang++ -std=gnu++2a pch.hpp -o pch.hpp.pch
$ clang++ -std=gnu++2a -include-pch pch.hpp.pch -c main.cpp
In file included from main.cpp:4:
./pch.hpp:14:11: error: redefinition of default argument
void f(int=0) requires true {}
          ^~
./pch.hpp:14:11: note: previous definition is here
void f(int=0) requires true {}
          ^~
In file included from main.cpp:4:
./pch.hpp:15:12: error: redefinition of default argument
void f(char='0') requires false {}
           ^~~~
./pch.hpp:15:12: note: previous definition is here
void f(char='0') requires false {}
           ^~~~
2 errors generated.
$</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>