infinity
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start with the tutorial's Very Simple Case in main.cpp and reproduce the text archive containing inf using the float infinity value. Trace the text archive deserialization path and compare it with the existing finite-float case; done means the serialized infinity value can be read back without an archive_exception.
Written by the indexing model from the issue text.
Description
Hi,
If I take the "Very Simple Case" from the tutorial, I get a text file with 22 serialization::archive 20 0 0 35 59 2.456699944e+01
Then:
--- a/main.cpp
+++ b/main.cpp
@@ -39,7 +39,7 @@ int main() {
std::ofstream ofs("filename");
// create class instance
- const gps_position g(35, 59, 24.567f);
+ const gps_position g(35, 59, std::numeric_limits<float>::infinity());
// save data to archive
{
lead to 22 serialization::archive 20 0 0 35 59 inf for the serialization, but deserialization fail with:
terminate called after throwing an instance of 'boost::archive::archive_exception'
what(): input stream error
Abandon (core dumped) ./build/inf
Is there a way to handle this kind of value ?
- Dominant language
- C++
- Stars
- 135
- Forks
- 148
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/serialization
-
waiting-for-input
Difficulty 5/5 Over a week Newbie friendliness 15/100
boostorg/serialization#331 · 1 comment ·
-
waiting-for-input
Difficulty 4/5 3-5 days Newbie friendliness 35/100
boostorg/serialization#183 · 22 comments ·
All issues in boostorg/serialization
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·