Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
windoze committed Mar 18, 2015
1 parent 24ddf3d commit 9242be9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/fibio/fiberize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ namespace fibio { namespace fibers {
* @param fn the entry point of the fiber
* @param args the arguments for the fiber
*/
template<typename Fn, typename ...Args, typename std::enable_if<!std::is_same<Fn, fibio::scheduler>::value>::type * = nullptr>
template<typename Fn, typename ...Args>
auto fiberize(Fn &&fn, Args&& ...args)
-> typename std::result_of<Fn(Args...)>::type
-> typename std::enable_if<!std::is_same<Fn, fibio::scheduler>::value, typename std::result_of<Fn(Args...)>::type>::type
{
struct resetter { ~resetter() { fibio::scheduler::reset_instance(); } } r;
return fiberize(fibio::scheduler::get_instance(),
Expand Down
7 changes: 3 additions & 4 deletions include/fibio/http/server/routing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,9 @@ namespace fibio { namespace http {
/**
* Routing table
*/
template<typename Fn,
typename std::enable_if<!std::is_constructible<server::request_handler, Fn>::value>::type* = nullptr
>
inline routing_rule rule(match &&m, Fn &&func)
template<typename Fn>
inline auto rule(match &&m, Fn &&func)
-> typename std::enable_if<!std::is_constructible<server::request_handler, Fn>::value, routing_rule>::type
{ return routing_rule{std::move(m), handler_(std::forward<Fn>(func))}; }

inline routing_rule rule(match &&m, server::request_handler &&h)
Expand Down

0 comments on commit 9242be9

Please sign in to comment.