boostorg / boostorg/safe_numerics

Unnecessary injection of std::string dependency for BOOST_NO_EXCEPTIONS

Open
#128 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
222
Forks
46
PR merge metrics
No merged PRs in 30d

Description

When using safe_numerics in embedded system (kernel mode code), where exceptions are disabled, uncessary dependency on std::string is created (std::exception and friends, as well). Currently I have patched this out locally via ``#ifdef BOOST_NO_EXCEPTIONS``, however maybe there might be better solution ?

https://github.com/boostorg/safe_numerics/blob/13ca3d6dd36db1aac2d6b5caca2c281d15c881ad/include/boost/safe_numerics/exception.hpp#L118
https://github.com/boostorg/safe_numerics/blob/13ca3d6dd36db1aac2d6b5caca2c281d15c881ad/include/boost/safe_numerics/exception.hpp#L190

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at include/boost/safe_numerics/exception.hpp around lines 118 and 190, focusing on how BOOST_NO_EXCEPTIONS affects the std::string and std::exception dependencies. Reproduce a no-exceptions embedded or kernel-mode build, then verify that the dependency is absent without changing behavior for exception-enabled builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.