| 871 | |
| 872 | template<bool Local> |
| 873 | struct SecondMW : public std::conditional<Local, crow::ILocalMiddleware, empty_type>::type |
| 874 | { |
| 875 | struct context |
| 876 | {}; |
| 877 | template<typename AllContext> |
| 878 | void before_handle(request& req, response& res, context&, AllContext& all_ctx) |
| 879 | { |
| 880 | all_ctx.template get<FirstMW<Local>>().v.push_back("2 before"); |
| 881 | if (req.url.find("/break") != std::string::npos) res.end(); |
| 882 | } |
| 883 | |
| 884 | template<typename AllContext> |
| 885 | void after_handle(request&, response&, context&, AllContext& all_ctx) |
| 886 | { |
| 887 | all_ctx.template get<FirstMW<Local>>().v.push_back("2 after"); |
| 888 | } |
| 889 | }; |
| 890 | |
| 891 | template<bool Local> |
| 892 | struct ThirdMW : public std::conditional<Local, crow::ILocalMiddleware, empty_type>::type |
nothing calls this directly
no outgoing calls
no test coverage detected