| 890 | |
| 891 | template<bool Local> |
| 892 | struct ThirdMW : public std::conditional<Local, crow::ILocalMiddleware, empty_type>::type |
| 893 | { |
| 894 | struct context |
| 895 | {}; |
| 896 | template<typename AllContext> |
| 897 | void before_handle(request&, response&, context&, AllContext& all_ctx) |
| 898 | { |
| 899 | all_ctx.template get<FirstMW<Local>>().v.push_back("3 before"); |
| 900 | } |
| 901 | |
| 902 | template<typename AllContext> |
| 903 | void after_handle(request&, response&, context&, AllContext& all_ctx) |
| 904 | { |
| 905 | all_ctx.template get<FirstMW<Local>>().v.push_back("3 after"); |
| 906 | } |
| 907 | }; |
| 908 | |
| 909 | TEST_CASE("middleware_context") |
| 910 | { |
nothing calls this directly
no outgoing calls
no test coverage detected