I consider both techniques to be guards. Generally, I use the pragma.
@deadbeef Only to prevent errors about duplication of entities at either compile or link time.
Excuse this pedantry if you are familiar with disaster phases.
1. Mitigation
2. Preparation
<the disaster aka the boom> "hunker down"
3. Response
4. Recovery
...repeat
The public needs messages during phases 2-4. That's the service Twitter, and FB provide with some success.
I'll address this for individuals and mainly reference hurricane disasters. But this is generally applicable to all disasters.
Phase 1 is less critical. This is where you get an emergency generator or install roof tie-downs.
Preparation is mainly done immediately before the disaster. Purchase water and food, plywood, fill gas tanks, etc.
Response after the boom is getting people to safe locations. Where are shelters? What roads are closed? Where are gas stations and food stores open?
Recovery is restoring normalcy. This is agencies explaining how to get assistance. This is FEMA, local disaster recovery groups, etc.
Recovery goes on for years, even for individuals. Because of this, it isn't feasible to bring up an instance for a specific disaster.
Is it feasible to create something new in a reasonable time? I don't know for sure. The core is providing messages, although providing a discussion area for pros might be useful. I see it as a local timeline that is only federated for outgoing messages. You don't want individuals chiming in on this instance.
@sspadt My birthday is today.
@SteveBellovin posted on death of Fred Brooks. Click his link.
@gdinwiddie
Of Mythical Man Month
Saw that on the bird site. I think Mastodon can address the need with a disaster-specific instance.
1. Instance is by invitation only to verified disaster specialists or organizations, e.g., local / state EOC.
2. Instance is federated, so anyone can follow the discussions and alerts on their timeline.
It would be interesting to see if some hashtags could be restricted to that instance to complement the 'verified' timeline. This would prevent, say, #disaster being used by just anyone.
It would be good if the instance could be mirrored.
I tried it both with backticks and four spaces which are standard Markdown. Here is it without Markdown turned on:
```
using StringVec = std::vector<std::string>;
std::expected<StringVec, ErrorCode> ;
```
using StringVec = std::vector<std::string>;
std::expected<StringVec, ErrorCode> f();
qoto.org has a 65k character limit. Others may have longer ones, also. It is dependent on the server.
Qoto also allows Markdown and Latex.
Playing with Markdown for code. It won't keep the line break in the code. Tried both 4 space indent and the three backspace.
using StringVec = td::vector<std::string>;
std::expected<StringVec, ErrorCode>
using StringVec = td::vector<std::string>;
std::expected<StringVec, ErrorCode>
```
using StringVec = td::vector<std::string>;
std::expected<StringVec, ErrorCode>
using StringVec = td::vector<std::string>;
std::expected<StringVec, ErrorCode>
```
@freemo
I''ve been doing a delete & re-draft because it isn't working properly. Can't get an NL to work.
A better starting point is std::optional. Look at my post in response to the OP, which has a link to an article I did on this before std::expected.
I'd do the simplification of your question as:
```
using StringVec = td::vector<std::string>;
std::expected<StringVec, ErrorCode>
```
I tackled the issue of returning errors for an SDK I wrote. Then did an article about it.
https://medium.com/gitconnected/c-return-any-optional-or-variant-3c2222dbf787
I spent a little time thinking about the creation of a social network. The technology isn't trivial, but ultimately, it is straightforward.
The safety, legal, and security/privacy issues are terrible.
Here's one set of thoughts and the original article it is based on about Mastodon.
https://changelog.com/news/scaling-mastodon-is-impossible-8lkE
I do some writing on Medium. https://medium.com/@rud-merriam
A couple articles on C++:
C++: Static Polymorphism Using Lambdas https://medium.com/gitconnected/c-static-polymorphism-using-lambdas-4919097aafe0
C++ Return: Any, Optional, or Variant?
https://medium.com/gitconnected/c-return-any-optional-or-variant-3c2222dbf787
What if you replaced the 1 with a `const uint8_t one {1};`
@hearthborn @KuJoe Local timeline is there just not very discoverable. It's called "Community", found under the search section
I am a retired software developer. Wrote my first FORTRAN IV in 1968. I am still writing C++. I have worked in embedded systems. I have done amateur robotics (non-destructive), including competing in NASA Centennial Challenges. The header image is from the Space Robotics Challenge.
Wrote for Hackaday.com for a few years about C++ with a focus on Arduino and Pi.
I am an Amateur Radio Operator, or Ham, licensed as K5RUD by the US FCC. That means I can build a transmitter without the FCC checking my build. Nobody but hams can do this.
Father of 2, although I lost my son in 2014. Grandfather of 3 (2m, 1f) and g-grandfather of 1 male.
I follow C++, legal, political, SF authors, and general random discussions.