diff --git a/java/nativeWrappers/src/main/java/com/epam/deltix/dfp/CxxWrappers.java b/java/nativeWrappers/src/main/java/com/epam/deltix/dfp/CxxWrappers.java index 8918136..268aa75 100644 --- a/java/nativeWrappers/src/main/java/com/epam/deltix/dfp/CxxWrappers.java +++ b/java/nativeWrappers/src/main/java/com/epam/deltix/dfp/CxxWrappers.java @@ -216,9 +216,8 @@ public static void make(final String outputRoot, final List api, final " return *this;\n" + " }\n" + " explicit operator std::string() const {\n" + - " char str[32];\n" + - " toString(str);\n" + - " return std::string(str);\n" + + " char str[512];\n" + + " return std::string(" + decimalNativePrefix + "to_string_3(_value, '.', str));\n" + " }\n" + " friend std::ostream& operator <<(std::ostream& output, " + dfpClassType + " const& a) {\n" + " output << a._value;\n" + diff --git a/native/demo.cpp b/native/demo.cpp index b1fb13b..9d84eea 100644 --- a/native/demo.cpp +++ b/native/demo.cpp @@ -37,6 +37,6 @@ int main(int argc, char *argv[]) { return 1; } - std::cout << x << "(=" << x.toUnderlying() << ") " << op << " " << y << "(=" << y.toUnderlying() << ") = " << z << "(=" << z.toUnderlying() << ")" << std::endl; + std::cout << x << "(=" << x.toUnderlying() << ") " << op << " " << (std::string)y << "(=" << y.toUnderlying() << ") = " << z << "(=" << z.toUnderlying() << ")" << std::endl; return 0; }