<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:rnk@google.com" title="Reid Kleckner <rnk@google.com>"> <span class="fn">Reid Kleckner</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [Win] LNK2005: bool const std::_Is_integral<bool> already defined"
   href="https://bugs.llvm.org/show_bug.cgi?id=42027">bug 42027</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>CONFIRMED
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [Win] LNK2005: bool const std::_Is_integral<bool> already defined"
   href="https://bugs.llvm.org/show_bug.cgi?id=42027#c12">Comment # 12</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - [Win] LNK2005: bool const std::_Is_integral<bool> already defined"
   href="https://bugs.llvm.org/show_bug.cgi?id=42027">bug 42027</a>
              from <span class="vcard"><a class="email" href="mailto:rnk@google.com" title="Reid Kleckner <rnk@google.com>"> <span class="fn">Reid Kleckner</span></a>
</span></b>
        <pre>I made clang give constexpr explicit specializations of variable templates
linkonce_odr linkage in r363191. This makes it so clang doesn't emit these
_Is_integral symbols in every object file that transitively includes
xtr1common, and if they are needed, they won't cause duplicate symbol errors.

This has essentially the same effect as implicitly considering all constexpr
variable templates as being marked 'inline'. It isn't strictly conforming,
because you could do this:

// tu1.cpp
template <class> const int foo;
extern template <> const int foo<int>;
const int *useit() { return &foo<int>; }
// tu2.cpp
template <class> const int foo;
template <> constexpr int foo<int> = 42;

With my change, clang will not emit foo<int> in tu2.cpp as written. But, for
constexpr variable templates, I think this will be very uncommon. The point of
constexpr is to be able to write constants and put them in headers to enable
further optimization.</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>