Commit d0c574c
committed
single header include and compile flag for http
the example http_client.cpp shows to include the headers in following
order:
```
```
However, a common setting in auto-formatters like clang-format will sort
the headers in alphabetical order (which is also a requirement in some
code-styles), like this:
```
```
But this will lead to compilation errors as `netlib.hpp` includes
headers that are needed by `client.hpp`, for example `<future>` but
also library-defined symbols like `DEFAULT_TIMEOUT` or `TICK_TIME`,
which are then included or defined after `client.hpp` needs them.
The ordering of includes of all needed library-headers should not
matter, but a single header file to include everything would be
preferable anyway. To exclude features like HTTP by default anyway, a
compile switch is added.1 parent b4ad632 commit d0c574c
2 files changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | | - | |
3 | | - | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments