This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/71382] New: Unary plus doesn't works with pointers to instantiations of function templates


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71382

            Bug ID: 71382
           Summary: Unary plus doesn't works with pointers to
                    instantiations of function templates
           Product: gcc
           Version: 5.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: roman.perepelitsa at gmail dot com
  Target Milestone: ---

This compiles:

  void F();
  void G() { +(&F); }

This doesn't:

  template <class T> void F();
  void G() { +(&F<void>); }

error: wrong type argument to unary plus

Expected behaviour: both examples compile.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]