Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added convenience overload for push_back_decimal. #55

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

skuzniar
Copy link
Contributor

@skuzniar skuzniar commented Apr 3, 2024

I found it quite useful with functions that split floating point number into mantissa and exponent and returning the result as a tuple.

writer.push_back_decimal(hffix::tag::Price, split(price));

@jamesdbrock
Copy link
Owner

Thanks for the PR @skuzniar . I'll think about it.

@@ -724,7 +724,7 @@ class message_writer {
* \throw std::out_of_range When the remaining buffer size is too small.
* \throw std::logic_error When called more than once for a single message.
*/
void push_back_header(char const* begin_string_version) {
size_t push_back_header(char const* begin_string_version) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you using these size_t return values in your application? What are you doing with them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooops, I did not mean it to be a part of the original pull request. I understand it is a big change that you may not want. I should have do it on a different branch.

I am actually using the return values to create partial skeleton messages that I later update with information that changes - for example Price and Quantity, with the rest remaining the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants