Opened 17 years ago
Closed 17 years ago
#461 closed Bugs (Invalid)
VC7.1 operator << doesn't work for non-const objects
| Reported by: | s-sivkov | Owned by: | Robert Ramey | 
|---|---|---|---|
| Milestone: | Component: | serialization | |
| Version: | None | Severity: | |
| Keywords: | Cc: | 
Description
The manual says operators & and << are equals. In fact,
operator << doesn't work for non-const objects, but
operator & works.
Yere is simple example:
if i change string
const gps_position g(35, 59, 24.567f);
to
gps_position g(35, 59, 24.567f);
(function main() in demo.cpp)
then i will see compilation error:
---
c:\Boost\include\boost-1_33\boost\archive\detail\oserializer.hpp(566):
error C2027: use of undefined type
'boost::STATIC_ASSERTION_FAILURE<x>'
        with
        [
            x=false
        ]
---
but for operator & (i.e. from
    oa << g;
to
    oa & g;
)
all works perfectly.
      Change History (2)
comment:2 by , 17 years ago
| Status: | assigned → closed | 
|---|
Logged In: YES user_id=396141 This is explained in the "Rationale" section of the manual.
  Note:
 See   TracTickets
 for help on using tickets.
    
