| 851 | |
| 852 | template<bool Local> |
| 853 | struct FirstMW : public std::conditional<Local, crow::ILocalMiddleware, empty_type>::type |
| 854 | { |
| 855 | struct context |
| 856 | { |
| 857 | std::vector<string> v; |
| 858 | }; |
| 859 | |
| 860 | void before_handle(request& /*req*/, response& /*res*/, context& ctx) |
| 861 | { |
| 862 | ctx.v.push_back("1 before"); |
| 863 | } |
| 864 | |
| 865 | void after_handle(request& /*req*/, response& /*res*/, context& ctx) |
| 866 | { |
| 867 | ctx.v.push_back("1 after"); |
| 868 | test_middleware_context_vector = ctx.v; |
| 869 | } |
| 870 | }; |
| 871 | |
| 872 | template<bool Local> |
| 873 | struct SecondMW : public std::conditional<Local, crow::ILocalMiddleware, empty_type>::type |
nothing calls this directly
no outgoing calls
no test coverage detected