Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error C2738
Collapse the table of content
Expand the table of content

Compiler Error C2738

Error Message

'declaration' : is ambiguous or is not a member of 'type'

A function was declared incorrectly.

The following sample generates C2738:

// C2738.cpp
struct A {
   template <class T> operator T*();
   // template <class T> operator T();
template <>
A::operator int() {   // C2738

// try the following line instead
// A::operator int*() {

// or use the commented member declaration

   return 0;

Community Additions

© 2015 Microsoft