Skip to content

Undocummented Macros #801

@8nvHHobXJ1KS

Description

@8nvHHobXJ1KS

I have seen that there are undocumented functions, I especially emphasize Macros and Aliases.

According to the crow::Crow class page of the Reference (and source code), it is recommended to use Macros such as CROW_ROUTE, CROW_BP_ROUTE, or CROW_WEBSOCKET_ROUTE (among others) instead of the methods of the Crow class itself.

/// Create a dynamic route using a rule (**Use CROW_ROUTE instead**)
DynamicRule& route_dynamic(const std::string& rule)
/// Create a route using a rule (**Use CROW_ROUTE instead**)
template<uint64_t Tag>
#ifdef CROW_GCC83_WORKAROUND
auto& route(const std::string& rule)
#else
auto route(const std::string& rule)
#endif

There are also two undocummented aliases for crow::Crow called crow::SimpleApp (crow::Crow<>), and crow::App (crow::Crow<Middlewares...>) which do not appear in the reference.

template<typename... Middlewares>
using App = Crow<Middlewares...>;
using SimpleApp = Crow<>;

I'm aware that these members appear repeatedly on the getting started page, but I think it would be wise to add them in the reference as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationItems related to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions