Skip to content

Refactor/has nullptr t#1143

Open
grisumbras wants to merge 3 commits intoboostorg:developfrom
grisumbras:refactor/has-nullptr_t
Open

Refactor/has nullptr t#1143
grisumbras wants to merge 3 commits intoboostorg:developfrom
grisumbras:refactor/has-nullptr_t

Conversation

@grisumbras
Copy link
Member

No description provided.

This will become useful when a non-temporary reference to a nullptr_t
object is needed (e.g. when passing to a coroutine).
@cppalliance-bot
Copy link

cppalliance-bot commented Feb 10, 2026

An automated preview of the documentation is available at https://1143.json.prtest2.cppalliance.org/libs/json/doc/html/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-02-12 12:06:09 UTC

value&& jv) -> decltype(
static_cast<Visitor&&>(v)( std::declval<std::nullptr_t&&>() ) )
{
auto const& scalar = detail::access::get_scalar(jv);
Copy link
Member

Choose a reason for hiding this comment

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

should this be auto const&? jv is a non-const rvalue reference.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops. Copy-paste error. I should change mys tests, since they didn't catch this.

@cppalliance-bot
Copy link

This is to avoid dangling references when the visitor returns
a coroutine.
@grisumbras grisumbras force-pushed the refactor/has-nullptr_t branch from 632d36e to 142065d Compare February 12, 2026 11:56
@cppalliance-bot
Copy link

GCOVR code coverage report https://1143.json.prtest2.cppalliance.org/gcovr/index.html
LCOV code coverage report https://1143.json.prtest2.cppalliance.org/genhtml/index.html
Coverage Diff Report https://1143.json.prtest2.cppalliance.org/diff-report/index.html

Build time: 2026-02-12 12:29:50 UTC

@cppalliance-bot
Copy link

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.

3 participants