Serialization support for small_vector

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Serialization support for small_vector

Boost - Users mailing list
Shalom

I've added support for small_vector to the C++ Middleware 
Writer.  

While testing the support, I got a warning about dereferencing a
type-punned pointer breaking strict-aliasing rules.  That was on
line 340 of small_vector.hpp.  I was using g++ 7.1 on FreeBSD/
TrueOS.

I used the following "Middle" code for testing:

message-lengths    variable
example_messages
    -out (message_id_8, ::boost::container::small_vector<int32_t,30>)
    -in                           (::boost::container::small_vector<int32_t,30>)
}


From what I could tell the serialization/deserialization worked fine.

If small_vector were broken out into a separate library
that would be helpful from my perspective.  It would make
it easier for me to add small_vector to my example code.


Brian
Ebenezer Enterprises - In G-d we trust.

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Serialization support for small_vector

Boost - Users mailing list
On 07/07/2017 7:22, Brian Wood via Boost-users wrote:
> Shalom
>
> I've added support for small_vector to the C++ Middleware
> Writer.
>
> While testing the support, I got a warning about dereferencing a
> type-punned pointer breaking strict-aliasing rules.  That was on
> line 340 of small_vector.hpp.  I was using g++ 7.1 on FreeBSD/
> TrueOS.

Thanks Brian,


It seems impossible to write portable system code in C++ recently ;-)
Could you please open a ticket with the full warning so that I can get
some clues?

> If small_vector were broken out into a separate library
> that would be helpful from my perspective.  It would make
> it easier for me to add small_vector to my example code.

small_vector is a wrapper around vector, so it's tightly coupled, I'm sorry.

Best,

Ion
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Loading...