TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C++ Coding Standard
Search

Rule:  PCA#018Checked automatically with code checker

Synopsis:Prefer std to boost if possible
Language:C++
Severity Level:5
Category:Parts of C++ to Avoid


Description:

Since the introduction of C++11, a lot of Boost functionality is now available from the standard library std. It is better to use standard library in such a case then the Boost variant in order to minimize the number of external dependencies.

Sometimes there is a one to one relation between std and boost such as boost::bind that is replaced by std::bind. But sometimes this relation is less trivial, e.g. to make a class non-copyable one should derive from the boost::noncopyable class in the Boost case:

class X : private boost::noncopyable {};

whereas in C++11 this is done differently by using "delete" for the constructor and copy constructor:

class X {
  X(const X&) = delete;
  X& operator=(const X&) = delete;
};