dbremner / mili

Automatically exported from code.google.com/p/mili
Boost Software License 1.0
0 stars 0 forks source link

add safety policy in bstream #58

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Bostream should have a template policy, Bostream<SafetyPolicy=Safe>

Safe: checks all custom objects should have operator<< overloaded
Unsafe: custom objects could use default operator<<

Original issue reported on code.google.com by hugo.arregui on 19 Jan 2012 at 3:27

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by hugo.arregui on 19 Jan 2012 at 1:57

GoogleCodeExporter commented 9 years ago

Original comment by hugo.arregui on 21 Feb 2012 at 8:33

GoogleCodeExporter commented 9 years ago
Safety policy should apply to integral types as well:
  in safe mode, serialization of integral types should be disallowed (due to bits size), so a manipulator should be used (otherwise: compiler error):
  bos << Serialize32bits(anInt)  //or better name
  bos << Serialize64bits(anInt)
  bis >> Serialize32bits(anInt)
  etc

This should be optional in non-safe mode.

Original comment by daniel.g...@fudepan.org.ar on 10 Mar 2012 at 8:12

GoogleCodeExporter commented 9 years ago
Note: safety should apply equally to both binstreams and bostreams.

Original comment by daniel.g...@fudepan.org.ar on 10 Mar 2012 at 8:13