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

v1.4.0 #54

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Install Boost
uses: MarkusJx/[email protected].4
uses: MarkusJx/[email protected].5
id: install-boost
with:
boost_version: 1.81.0
boost_version: 1.83.0
- name: Test
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
shell: bash
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,19 @@ mostly irrelevent.
<table>
<caption>Change Log</caption>

<tr>
<th>2024-02-19</th>
<th>v1.4.0</th>
<td>

Add `hffix::message_writer::push_back_header()` for `string_view`,
and `hffix::field_value::as_string_view()`
by [Slawomir Kuzniar @skuzniar](https://github.com/skuzniar)
(#51)

</td>
</tr>

<tr>
<th>2023-04-28</th>
<th>v1.3.0</th>
Expand Down
15 changes: 13 additions & 2 deletions include/hffix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,10 @@ inline bool atotime_nano(
\tparam Duration a std::chrono::duration type used to measure the time since epoch
*/
template<typename T>
struct is_time_point : std::false_type {};
struct is_time_point : std::false_type {};

template<typename Clock, typename Duration>
struct is_time_point<std::chrono::time_point<Clock, Duration>> : std::true_type {};
struct is_time_point<std::chrono::time_point<Clock, Duration>> : std::true_type {};

/*
\brief Internal ascii-to-timepoint conversion with millisecond precision.
Expand Down Expand Up @@ -742,6 +742,17 @@ class message_writer {
}

#if __cplusplus >= 201703L
/*!
* \brief Write the _BeginString_ and _BodyLength_ fields to the buffer.
*
* This method must be called before any other `push_back` method. It may only be called once for each message_writer.
*
* \pre No other `push_back` method has yet been called.
* \param begin_string_version The value for the BeginString FIX field. Should probably be "FIX.4.2" or "FIX.4.3" or "FIX.4.4" or "FIXT.1.1" (for FIX 5.0).
*
* \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(std::string_view begin_string_version) {
if (body_length_) throw std::logic_error("hffix message_writer.push_back_header called twice");
if (buffer_end_ - next_ < 2 + std::ptrdiff_t(begin_string_version.size()) + 3 + 7) {
Expand Down
Loading