## +21
## Custom Views for the Rest of Us
## JACOB RICE
20
21
October 24-29
## Custom Views for the Rest of Us
Jacob Rice
jacob.rice.cpp@gmail.com
KEYSIGHT TECHNOLOGIES
1 using namespace std::views; t2)
3 {
// Algorithm stuff...
std::ranges::swap(t1, t2);
// More algorithm
## Calls the custom version, if it exists (same for begin and end):
1 template
2 void AlgorithmThatSwaps(T& type: std::ranges::range_adaptor_closure.
• Ensure all closure objects inherit from this.
• Custom closure objects can then use it, too.
namespace detail
{
template
concept
## +23
## The Absurdity of Error Handling: Finding a Purpose for Errors in Safety-Critical SYCL
## ERIK TOMUSK
## codeplay $ ^{®} $
Enabling AI & HPC To Be Open, Safe & Accessible To All
or personal capacity, unless explicitly stated
## Outline
• Definition of Safety
• Definition of Error Handling
• Case Study
• Why is this Important?
• Is it Really so bad?
• What does this mean for of Error Handling
## Definition of Error Handling
Error: An unintended occurrence
• Various means to communicate the presence of an error
• Error codes; C++ exceptions; std::unexpected
Error Handling:
## +24
## Modern C++ Error Handling
## PHIL NASH
## 20 24 September 15 - 20
## Modern C++ Error Handling
Phil Nash

## ## Option(al) Is Not a Failure
## 2018
@phil_nash
## the Dawn of a New Error
## 2019
## Part 1
## a Series (total) of disappointments
int parse_int(std::string_view number)
## -
int parse_int(std::string_view return out;
}
if(first_digit)
throw std::runtime_error(
std::format("{}" is not a number, number));
else
throw std::runtime_error(
std::format("{}" has non-numeric
interpreter. Note that we’ve enabled Flask debugging mode to provide code reloading and better error messages.
$ python api.py
* Running on http://127.0.0.1:5000/
* Restarting with reloader
Warning: Debug 201
class Todo3(Resource):
def get(self):
# Set the response code to 201 and return custom headers
return {'task': 'Hello world'}, 201, {'Etag': 'some-opaque-string'} RequestParser.parse_args() returns a Python dictionary instead of a custom data structure.
Using the reqparse module also gives you sane error messages for free. If an argument fails to pass validation, Flask-RESTful
nts/d/2/6/d/d26d5cae10c0ade376c5722cf7e63541/p18_1.jpg)
### 1.22 Text wrapping
To break long messages, you can manually add in your text.
Another option is to use maxMessageSize setting:
@startuml plantuml.net/9573) and [QA-13234](https://forum.plantuml.net/13234)]*
### 1.28 Incoming and outgoing messages
You can use incoming or outgoing arrows if you want to focus on a part of the diagram.
Use square d/d26d5cae10c0ade376c5722cf7e63541/p23_2.jpg)
### 1.29 Short arrows for incoming and outgoing messages
You can have short arrows with using ?.
@startuml
?-> Alice : ""?->"\n**short**