Edit

Share via


Compiler Error C2640

'abstract declarator': __based modifier illegal on reference

The __based modifier can be used on pointers only.

The following sample generates C2640:

// C2640.cpp
int* ptr;

int main()
{
    int __based(ptr)& based_ref;   // C2640
    int __based(ptr)* based_ptr;   // OK
}