Can't return void from type function instantiation with dependent args for use
in function declaration.
all versions from 3.4 to the latest 4.3.0 build on x86 cygwin/linux complain
with:
error: invalid parameter type 'void'
...
=========================================
template <int cond>
struct F { typedef void Type; };
template <int I>
struct X {
// does not accept dependent computed type void!
// (void* is fine as is non-dependent F<0>::Type)
typedef typename F<I>::Type ParmT;
static int func(ParmT) { return 1; }
};
int main()
{
int i = X<0>::func();
}
========================================
The VisualC++ compilers are fine.
--
Summary: invalid computed void parameter in template
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: paul_m_doc at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32058