Skip to content

Commit

Permalink
mark some functions constexpr
Browse files Browse the repository at this point in the history
Reviewed By: yfeldblum

Differential Revision: D29235403

fbshipit-source-id: 7af7df3cd0f7d0c4d0c3e303ca21185c6944e0c7
  • Loading branch information
Mizuchi authored and facebook-github-bot committed Jun 18, 2021
1 parent fb55602 commit f602751
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fatal/type/foreach.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace fatal {

template <typename List, typename Visitor, typename... Args>
FATAL_ATTR_ALWAYS_INLINE
static inline void foreach(Visitor&& visitor, Args&&... args) {
constexpr static inline void foreach(Visitor&& visitor, Args&&... args) {
impl_fe::f<List, make_index_sequence<size<List>::value>>::g(
static_cast<Visitor &&>(visitor),
static_cast<Args &&>(args)...
Expand Down
2 changes: 1 addition & 1 deletion fatal/type/impl/foreach.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ struct f<list<T...>, index_sequence<Indexes...>> {

template <typename Visitor, typename... Args>
FATAL_ATTR_ALWAYS_INLINE FATAL_ATTR_VISIBILITY_HIDDEN
static void g(Visitor &&visitor, Args &&...args) {
constexpr static void g(Visitor &&visitor, Args &&...args) {
using _ = int[];
void(_{(void(visitor(indexed<T, Indexes>{}, args...)), 0)...});
}
Expand Down

0 comments on commit f602751

Please sign in to comment.