Skip to content

Commit

Permalink
handle noexcept SignatureOf and ArgTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
cstratopoulos committed Jun 4, 2019
1 parent 9f2d417 commit 306965b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions folly/detail/PolyDetail.h
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,16 @@ struct SignatureOf_<R (C::*)(As...) const, I> {
using type = Ret<R, I> (*)(Data const&, Arg<As, I>...);
};

template <class R, class C, class... As, class I>
struct SignatureOf_<R(C::*)(As...) noexcept, I> {
using type = std::add_pointer_t<Ret<R, I>(Data&, Arg<As, I>...) noexcept>;
};

template <class R, class C, class... As, class I>
struct SignatureOf_<R(C::*)(As...) const noexcept, I> {
using type = std::add_pointer_t<Ret<R, I>(Data const&, Arg<As, I>...) noexcept>;
};

template <class R, class This, class... As, class I>
struct SignatureOf_<R (*)(This&, As...), I> {
using type = Ret<R, I> (*)(Data&, Arg<As, I>...);
Expand All @@ -424,6 +434,11 @@ struct ArgTypes_<User, I, Ret (*)(Data, Args...)> {
using type = TypeList<Args...>;
};

template <FOLLY_AUTO User, class I, class Ret, class Data, class... Args>
struct ArgTypes_<User, I, Ret (*)(Data, Args...) noexcept> {
using type = TypeList<Args...>;
};

template <FOLLY_AUTO User, class I>
using ArgTypes = _t<ArgTypes_<User, I>>;

Expand Down

0 comments on commit 306965b

Please sign in to comment.