I think supporting both way is better if there is a enough explanation. I don't want to drop a simpler way to do the same job.
CROW_ROUTE(app, "/about")
([](){
return "About Crow example";
});
CROW_ROUTE(app, "/about")
([](Response res){
res.send("About Crow example");
});Also, you said this adds complexity and overhead. I dispute that it adds complexity. For most people: "return stuff" vs "res.send(stuff)". And I wouldn't assume that it would add any overhead either. If you disagree, let me know when you've read the code and understand how boost::asio works.
The difference is a big reason why Apache 2.2 would slow to a crawl and eat up gigabytes of RAM at 100% processor utilization on the same load that Nginx could handle with 10Mb of RAM and 20% processor utilization. [1] (I understand more recent versions of Apache now support polling [2].)
[1] See, for example, this explanation: http://stackoverflow.com/questions/2583350/is-epoll-the-esse...
[edit] This would allow people using your framework to implement long polling without locking up an io_service thread for each connection. It would also make it easier to add support for web sockets etc at a later date.
[edit2] This is how NodeJS works. Both a request and a response object is passed to the callback, then you can do for example: