Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.


BOOST_CONTRACT_HEADER_ONLY — Automatically defined by this library when it is being used as a header-only library (not recommended).


// In header: <boost/contract/core/config.hpp>



This macro is not a configuration macro and this library will generate a compile-time error if users try to define it directly. This library will automatically define this macro when users do not define BOOST_CONTRACT_DYN_LINK (or BOOST_ALL_DYN_LINK) and BOOST_CONTRACT_STATIC_LINK. When used as a header-only library, this library code does not have to be compiled separately from user code, this library headers are simply included and compiled as part of the user program.

[Warning] Warning

This library is not guaranteed to always work correctly at run-time when this macro is defined (define BOOST_CONTRACT_DYN_LINK or BOOST_ALL_DYN_LINK instead). However, this macro can be defined and this library can be safely used as a header-only library for user code that checks contracts in a single program unit (e.g., a single program with only statically linked libraries).

See Also:

Getting Started