Skip to content

Added convenience overload for push_back_decimal.#55

Open
skuzniar wants to merge 3 commits into
jamesdbrock:masterfrom
skuzniar:master
Open

Added convenience overload for push_back_decimal.#55
skuzniar wants to merge 3 commits into
jamesdbrock:masterfrom
skuzniar:master

Conversation

@skuzniar

@skuzniar skuzniar commented Apr 3, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Owner

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

Comment thread include/hffix.hpp
* \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
Copy Markdown
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
Copy Markdown
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