Midiman / mili

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

integral conversion policy for bstreams #63

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please provide an integral conversion policy about what to do when
  - converting from size_t to uint32_t
and
  - size of both types differ.

Please refer to the comment in 
http://code.google.com/p/mili/source/detail?r=338&url_prefix=p for further 
details.

If types are equal (32bits), then the policy should just be ignored. This could 
be achieved with a policy type mapper:
   ConversionPolicy<size>::Policy
(where Policy can be many).

Original issue reported on code.google.com by daniel.g...@fudepan.org.ar on 10 Mar 2012 at 7:59

GoogleCodeExporter commented 9 years ago
In debug mode, the default policy should be "ThrowIfTruncation", since we might 
be debugging a bug that causes a string to be huge;
In non-debug, the default policy should be "DontCheckTruncation".

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