Diagnostic 646: parameter of abstract class type

Cause:
When declaring a parameter with the type of an abstract base class

Example:

class CBase { virtual void foo() = 0; }; 
class A: public CBase {
    void foo(); 
}; 
void testfoo(CBase b); // not allowed since the class is abstract 
void testfoo_ok(A b); // ok 
void testfoo_ok2(CBase* pB); // ok

Command line output:

E:\test>icl /c /Od /EHsc t.cpp
Intel® C++ Compiler Professional for applications running on IA-32, Version 11.1
Build 20100806 Package ID: w_cproc_p_11.1.067
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.

t.cpp
t.cpp(9): error: parameter of abstract class type "CBase" is not allowed:
            function "CBase::foo" is a pure virtual function
  void testfoo(CBase b); // not allowed since the class is abstract
               ^

compilation aborted for t.cpp (code 2)

E:\test>

Resolution:
use the proper declaration.

For more complete information about compiler optimizations, see our Optimization Notice.