drogonframework / drogonframework/drogon

Support C++ concepts

Open
#736 3 comments 0 reactions 1 assignee Claimed by @marty1885 View on GitHub
Dominant language
C++
Stars
14.3k
Forks
1.4k
Avg merge
1d 13h
Merged PRs (30d)
14

Description

This is more of a note for myself.

**Is your feature request related to a problem? Please describe.**
As of now, the compile-time error messages is very ugly for `app().registerHandler()`. As it depends of multiple layers of SFINAE to detect if the function have the correct signature. Which is annoying while developing applications.

**Describe the solution you'd like**
```c++
template
concept HTTPFunction = FunctionTraits::isHTTPFunction;
```

And put it somewhere before SFINAE.

**Additional context**
GCC doesn't label itself as supporting C++20 before GCC 11. And unlike coroutines, there's no way to detect if a compiler supports concepts. I'll wait till GCC 11's release to implement this.

(My clang doesn't support coroutines, so can't test weather it deal with coroutines correctly. It shouldn't be an issue, but I rather be on the safe side)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.