Skip to content

infinity #386

Description

@nim65s

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions