<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:richard-llvm@metafoo.co.uk" title="Richard Smith <richard-llvm@metafoo.co.uk>"> <span class="fn">Richard Smith</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - error: instantiation of function required here, but no definition is available"
   href="https://llvm.org/bugs/show_bug.cgi?id=31379">bug 31379</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>richard-llvm@metafoo.co.uk
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - error: instantiation of function required here, but no definition is available"
   href="https://llvm.org/bugs/show_bug.cgi?id=31379#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - error: instantiation of function required here, but no definition is available"
   href="https://llvm.org/bugs/show_bug.cgi?id=31379">bug 31379</a>
              from <span class="vcard"><a class="email" href="mailto:richard-llvm@metafoo.co.uk" title="Richard Smith <richard-llvm@metafoo.co.uk>"> <span class="fn">Richard Smith</span></a>
</span></b>
        <pre>Thank you for the bug report!

The warning is correct, and is detecting exactly the problem it was designed to
detect.

The definition of message::message() at message.cpp:44 causes the generation of
the default constructor of message::property_map, which triggers the
instantiation of the default constructor of internal::cached_map<std::string,
scalar>.

But the default constructor of the internal::cached_map template is not defined
in this file, so it will not be instantiated. The program is therefore
ill-formed (no diagnostic required) unless that template is explicitly
instantiated for that set of template arguments somewhere else. (And if not, in
practice whether or not it works depends on how lucky you get: if the default
constructor is instantiated in some other source file, the program will
typically happen to work unless every use of it is inlined.)

The warning can be suppressed by using an explicit instantiation declaration,
explicitly stating the intent to explicitly instantiate that template somewhere
else.</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>