kastnermario / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

Conversion to signed char not supported #217

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Build the library on a Linux/Aix machine.
2. Write a simple main that construct a node and try to call node.as<int8_t>();
3. This will not compile as on Linux/Aix Machine int8_t is a signed char which 
is different from char/unsigned char.

What is the expected output? What do you see instead?
I would expect to be able to call node.as<signed char>(); to convert a node to 
a signed char

What version of the product are you using? On what operating system?
x86_64 GNU/Linux (Redhat)
version used:yaml-cpp-0.5.1

Please provide any additional information below.
Can you add the following into yaml-cpp/node/convert.h
YAML_DEFINE_CONVERT_STREAMABLE_SIGNED(signed char);
just after
YAML_DEFINE_CONVERT_STREAMABLE_SIGNED(char);
YAML_DEFINE_CONVERT_STREAMABLE_UNSIGNED(unsigned char);

Thanks very much

Original issue reported on code.google.com by hawartal...@gmail.com on 6 Sep 2013 at 10:12

GoogleCodeExporter commented 8 years ago

Original comment by jbe...@gmail.com on 6 Sep 2013 at 5:11

GoogleCodeExporter commented 8 years ago
Fixed, r5ccd3b0b921a4bb0b71c418a222a8a96af3fc51a.

Original comment by jbe...@gmail.com on 24 Jan 2015 at 9:20