[llvm-bugs] [Bug 49724] New: Partial template specialization error with member function

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 25 11:04:05 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=49724

            Bug ID: 49724
           Summary: Partial template specialization error with member
                    function
           Product: clang
           Version: 11.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: eldlistmailingz at tropicsoft.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

The code:

#include <cstddef>
#include <type_traits>

template <class T, class C, T (C::*g)(), bool (C::*s)(T), class dummy = void>
class pmfu;

template <class T, class C, T (C::*g)(), bool (C::*s)(T)>
class pmfu<T,C,g,s,typename std::enable_if<g != nullptr && s == nullptr>::type> 
  {
  public:
  explicit pmfu(C & c) { }
  };

template<typename T>
struct pmfu_d
  {
  pmfu_d() : gl_r() { }
  T gl_r;
  T gl_fun_r_read() { return gl_r; }
  };

pmfu_d<char> data_inst_char;

pmfu<char,
     pmfu_d<char>,
     &pmfu_d<char>::gl_fun_r_read,
     nullptr> 
pf_read_ch(data_inst_char);

int main() { return 0; }

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210325/1be7396d/attachment.html>


More information about the llvm-bugs mailing list