[PATCH] Instantiate static constexpr member function of a local struct in a function template earlier.

Michael Park mcypark at gmail.com
Fri Apr 24 13:24:59 PDT 2015


This patch instantiates the pending local instantiations earlier in order
to enable to following code to compile:

  template <typename T>
  void F() {
    struct Num {
      static constexpr int Get() { return 42; }
    };
    constexpr int n = Num::Get();
  }

  int main() {
    F<int>();
  }

This addresses PR20625.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150424/1758303e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr20625.patch
Type: application/octet-stream
Size: 1697 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150424/1758303e/attachment.obj>


More information about the cfe-commits mailing list