Non-public access for new operator

Non-public visibility for placement new operator makes this class unusable with C++ containers.

The C++ standard template library (STL) provides a number of useful container classes. These classes are parameterized by the type of the object in the collection. The STL template classes impose some requirements on the kinds of objects that can be put into a collection. In particular, the object must possess a public new operator. Therefore, if you define a class that defines its own new placement new operator and that operator is not public, then that class cannot take advantage of the STL containers. This message flags such a class. Unless there is a compelling reason, it is best to make the new operator public.

ID

Observation

Description

1

Definition

This shows where the constructor was defined

Copyright © 2010, Intel Corporation. All rights reserved.