mcpp index

compat.boost-throw-exception

#include

Boost.ThrowException 1.92.0 — common exception-raising infrastructure for Boost libraries

#include <boost/throw_exception.hpp>
mcpp add compat.boost-throw-exception@1.92.0

Usage

From this repository's own test project — built and run by CI, not written for the website.

// Behavioral test: BOOST_THROW_EXCEPTION raises an exception catchable as its
// own std::exception base, carrying the original message through what().
#include <boost/throw_exception.hpp>
#include <stdexcept>
#include <cstring>

int main() {
    bool caught = false;
    try {
        BOOST_THROW_EXCEPTION(std::runtime_error("compat probe"));
    } catch (const std::exception& e) {
        caught = std::strstr(e.what(), "compat probe") != nullptr;
    }
    return caught ? 0 : 1;
}

tests/examples/boost-throw-exception/tests/throw_exception.cpp · project tests/examples/boost-throw-exception

Build

targets
boost_throw_exception (lib)
language
c++20
import std
no
include dirs
*/include

Sources (1)

  • mcpp_generated/boost_throw_exception_anchor.cpp

Generated files

  • mcpp_generated/boost_throw_exception_anchor.cpp

Versions

VersionPlatforms Mirrorssha256
1.92.0 latest LinuxWindowsmacOS source 1ddbb967a435…