Skip to content

Adding char const* buffer() const noexcept; method cpp #601

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

Closed
kdoherty2 opened this issue Oct 9, 2018 · 1 comment
Closed

Adding char const* buffer() const noexcept; method cpp #601

kdoherty2 opened this issue Oct 9, 2018 · 1 comment

Comments

@kdoherty2
Copy link

kdoherty2 commented Oct 9, 2018

In order to be able to pass a const reference of the SBE Message and access the underlying buffer
consider adding method:

char const* buffer() const SBE_NOEXCEPT;

char const* buffer() const SBE_NOEXCEPT
{
    return m_buffer;
} 

The generator only generates a non-const version:

char* buffer() SBE_NOEXCEPT
{
     return m_buffer;
}
@mjpt777
Copy link
Contributor

mjpt777 commented Oct 22, 2018

I got tripped by the styling.

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

No branches or pull requests

2 participants