[Bug c++/69098] [6.0 regression] Member function pointer template flagged with 'is not a function template'

2016-01-05 Thread hir...@trash-mail.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69098

--- Comment #3 from hir...@trash-mail.com ---
Your testcase is really quite a bit smaller still – impressive skills! :)

Thanks for confirming and since 5.1.0 works for you, on Wandbox and
additionally your testcase doesn’t fail locally, I guess I might just have
looked at the wrong one of my two installations when I queried the version,
perhaps I forgot to prepend '.\' or something like that.

[Bug c++/69098] Member function pointer template flagged with 'is not a function template'

2016-01-02 Thread hir...@trash-mail.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69098

--- Comment #1 from hir...@trash-mail.com ---
The error message I got, copied from Wandbox:

prog.cc: In instantiation of 'static void
Specializer::InnerClassTempl< >::InnerMemberFn() [with unsigned int
 = 0u]':
prog.cc:16:24:   required from here
prog.cc:33:36: error: 'template constexpr void (Specializer::* const
SpecPerType::SpecMbrFnPtr)()< >' is not a function
template
  typename Spec::FnType ErrorSite = Spec::template SpecMbrFnPtr;
^~~~

prog.cc:33:36: error: 'SpecMbrFnPtr' is not a member of 'Spec {aka
SpecPerType}'

[Bug c++/69098] New: Member function template flagged with 'is not a function template'

2015-12-30 Thread hir...@trash-mail.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69098

Bug ID: 69098
   Summary: Member function template flagged with 'is not a
function template'
   Product: gcc
   Version: unknown
   URL: http://melpon.org/wandbox/permlink/DShqHOBBMDx3X0H2
Status: UNCONFIRMED
  Keywords: rejects-valid
  Severity: minor
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hir...@trash-mail.com
  Target Milestone: ---

GCC HEAD on Wandbox rejects the code I pasted below, while Clang accepts it
without errors. Link: http://melpon.org/wandbox/permlink/DShqHOBBMDx3X0H2

I also have a local TDM-GCC 5.1.0 (DW2) installation which gives the same error
message for my original code, but for some reason the bug doesn’t trigger on
Wandbox’s 5.1.0 with the minimal testcase I’ve extracted.

/*-- Code --*/
template struct SpecPerType;

class Specializer
{
public:
template void MbrFnTempl() //Must be a template
{
}
template struct InnerClassTempl
{  //Had to be a template whenever I tested for it
static void InnerMemberFn();
};

void Trigger()
{
InnerClassTempl<0u>::InnerMemberFn();
}
};

template<> struct SpecPerType
{
using FnType = void (Specializer::*)();
template static constexpr FnType SpecMbrFnPtr =
::template MbrFnTempl;
};

template constexpr SpecPerType::FnType
SpecPerType::SpecMbrFnPtr; //Just a formalism

template void Specializer::InnerClassTempl::InnerMemberFn()
{
using Spec = SpecPerType;
typename Spec::FnType ErrorSite = Spec::template SpecMbrFnPtr;
//ErrorSite would get called next in the original code
//(this should result in a call to MbrFnTempl)
}

int main()
{
}