Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes failing build of web-server-tls target #20

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

mority
Copy link
Contributor

@mority mority commented Aug 8, 2024

Building web-server-tls currently fails with an error:

/home/mority/code/net/include/net/web_server/query_router.h:15:10: fatal error: 'utl/overloaded.h' file not found
   15 | #include "utl/overloaded.h"
      |          ^~~~~~~~~~~~~~~~~~
1 error generated.

We also need C++20 for concepts:

In file included from /home/mority/code/net/src/web_server/query_router.cc:1:
/home/mority/code/net/include/net/web_server/query_router.h:31:1: error: unknown type name 'concept'
   31 | concept JSON = boost::json::has_value_to<T>::value &&
      | ^
/home/mority/code/net/include/net/web_server/query_router.h:35:1: error: unknown type name 'concept'
   35 | concept StringRouteHandler = requires(std::string_view const& req, Fn f) {
      | ^
/home/mority/code/net/include/net/web_server/query_router.h:35:56: error: expected '(' for function-style cast or type construction
   35 | concept StringRouteHandler = requires(std::string_view const& req, Fn f) {
      |                                       ~~~~~~~~~~~~~~~~ ^
/home/mority/code/net/include/net/web_server/query_router.h:35:68: error: 'Fn' does not refer to a value
   35 | concept StringRouteHandler = requires(std::string_view const& req, Fn f) {
      |                                                                    ^
/home/mority/code/net/include/net/web_server/query_router.h:34:20: note: declared here
   34 | template <typename Fn>
      |                    ^
/home/mority/code/net/include/net/web_server/query_router.h:40:1: error: unknown type name 'concept'
   40 | concept Function = std::is_function_v<Fn>;
      | ^
/home/mority/code/net/include/net/web_server/query_router.h:43:1: error: unknown type name 'concept'
   43 | concept JsonRouteHandler =
      | ^
/home/mority/code/net/include/net/web_server/query_router.h:44:14: error: 'Fn' does not refer to a value
   44 |     requires(Fn f, typename utl::first_argument<Fn> arg) {
      |              ^
/home/mority/code/net/include/net/web_server/query_router.h:42:20: note: declared here
   42 | template <typename Fn>
      |                    ^
/home/mority/code/net/include/net/web_server/query_router.h:44:53: error: expected '(' for function-style cast or type construction
   44 |     requires(Fn f, typename utl::first_argument<Fn> arg) {
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/home/mority/code/net/include/net/web_server/query_router.h:49:1: error: unknown type name 'concept'
   49 | concept UrlRouteHandler = requires(boost::urls::url_view const& url, Fn f) {
      | ^
/home/mority/code/net/include/net/web_server/query_router.h:49:58: error: expected '(' for function-style cast or type construction
   49 | concept UrlRouteHandler = requires(boost::urls::url_view const& url, Fn f) {
      |                                    ~~~~~~~~~~~~~~~~~~~~~ ^
/home/mority/code/net/include/net/web_server/query_router.h:49:70: error: 'Fn' does not refer to a value
   49 | concept UrlRouteHandler = requires(boost::urls::url_view const& url, Fn f) {
      |                                                                      ^
/home/mority/code/net/include/net/web_server/query_router.h:48:20: note: declared here
   48 | template <typename Fn>
      |                    ^
/home/mority/code/net/include/net/web_server/query_router.h:60:13: error: unknown type name 'StringRouteHandler'
   60 |   template <StringRouteHandler Fn>
      |             ^
/home/mority/code/net/include/net/web_server/query_router.h:62:23: error: unknown type name 'Fn'
   62 |                       Fn&& fn) {
      |                       ^
/home/mority/code/net/include/net/web_server/query_router.h:84:13: error: unknown type name 'JsonRouteHandler'
   84 |   template <JsonRouteHandler Fn>
      |             ^
/home/mority/code/net/include/net/web_server/query_router.h:85:53: error: unknown type name 'Fn'
   85 |   query_router& post(std::string const& path_regex, Fn&& fn) {
      |                                                     ^
/home/mority/code/net/include/net/web_server/query_router.h:110:13: error: unknown type name 'UrlRouteHandler'
  110 |   template <UrlRouteHandler Fn>
      |             ^
/home/mority/code/net/include/net/web_server/query_router.h:111:52: error: unknown type name 'Fn'
  111 |   query_router& get(std::string const& path_regex, Fn&& fn) {
      |                                                    ^
/home/mority/code/net/include/net/web_server/query_router.h:95:75: error: template argument for template type parameter must be a type
   95 |                 fn(boost::json::value_to<std::decay_t<utl::first_argument<Fn>>>(
      |                                                                           ^~
/home/mority/code/net/deps/utl/include/utl/overloaded.h:17:20: note: template parameter is declared here
   17 | template <typename T>
      |                    ^
18 errors generated.

@felixguendling felixguendling merged commit 6b7d604 into motis-project:master Aug 8, 2024
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants