Skip to content

Conversation

@jonatack
Copy link
Member

@jonatack jonatack commented Sep 3, 2021

Add contextual documentation for developers and future readers of the code regarding

@jonatack
Copy link
Member Author

jonatack commented Sep 3, 2021

I just saw this explanatory comment at the time: https://github.com/bitcoin/bitcoin/pull/19387/files#r451060526. Not sure if the context is still the same, as the attributes header file previously contained other code.

@sipa
Copy link
Member

sipa commented Sep 3, 2021

Yeah, this was done intentionally to keep span.h reusable without depending on other project files. I don't think anything changed about that.

I don't personally feel strongly either way; just pointing out the reason back then.

@practicalswift
Copy link
Contributor

cr ACK 419d4767d07f0d9affddca6bb8c469ae79a47d63

@fanquake
Copy link
Member

fanquake commented Sep 5, 2021

cc @theuni

@jonatack
Copy link
Member Author

jonatack commented Sep 5, 2021

(If it is preferred to keep span.h self-contained, I'd be tempted to convert this patch to documenting the intention and reason here and wrt #22140 to help future readers of the code.)

@laanwj
Copy link
Member

laanwj commented Sep 9, 2021

No strong opinion here, remember that in principle the entire file can be considered temporary compatibility code until c++20, it's fine with me to treat it as a self-contained drop-in instead of really a part of our project.

@jonatack jonatack changed the title refactoring: use attributes::LIFETIMEBOUND in span.h doc: provide context for CNetAddr::UnserializeV1Array() and span.h with lifetimebound Sep 23, 2021
@jonatack
Copy link
Member Author

Updated this patch to provide contextual documentation for developers regarding

@laanwj
Copy link
Member

laanwj commented Nov 17, 2021

Thanks for the clarifications.
Documentation review ACK 33c6a20

@laanwj laanwj merged commit 2ef186a into bitcoin:master Nov 17, 2021
@jonatack jonatack deleted the span-lifetimebound branch November 17, 2021 16:08
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Nov 17, 2021
…Array() and span.h with lifetimebound

33c6a20 span, doc: provide span.h context and explain lifetimebound definition (Jon Atack)
d14395b net, doc: provide context for UnserializeV1Array() (Jon Atack)

Pull request description:

  Add contextual documentation for developers and future readers of the code regarding
  - CNetAddr::UnserializeV1Array (see bitcoin#22140)
  - Span and why it defines Clang lifetimebound locally rather than using the one in attributes.h

ACKs for top commit:
  laanwj:
    Documentation review ACK 33c6a20

Tree-SHA512: cb8e6a6c23b36c9ef7499257e97c5378ec895bb9122b79b63b572d9721a1ae6ce6c0be7ad61bdf976c255527ae750fc9ff4b3e03c07c6c797d14dbc82ea9fb3a
@bitcoin bitcoin locked and limited conversation to collaborators Nov 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants