Commit e2441fcc authored by Dominik Charousset's avatar Dominik Charousset

Coding style nitpicks

parent 489a24e1
...@@ -51,11 +51,10 @@ template <class List, size_t N> ...@@ -51,11 +51,10 @@ template <class List, size_t N>
struct il_right; struct il_right;
template <long... Is, size_t N> template <long... Is, size_t N>
struct il_right<int_list<Is...>, N> : il_right_impl<(N > sizeof...(Is) struct il_right<int_list<Is...>, N> {
? sizeof...(Is) using type = typename il_right_impl<(N > sizeof...(Is) ? sizeof...(Is) : N),
: N), sizeof...(Is), Is...>::type;
sizeof...(Is), };
Is...> { };
/** /**
* Creates indices for `List` beginning at `Pos`. * Creates indices for `List` beginning at `Pos`.
...@@ -84,13 +83,13 @@ struct il_indices<List<T0, Ts...>, Pos, int_list<Is...>> { ...@@ -84,13 +83,13 @@ struct il_indices<List<T0, Ts...>, Pos, int_list<Is...>> {
}; };
template <class T> template <class T>
constexpr auto get_indices(const T&) -> typename il_indices<T>::type { typename il_indices<T>::type get_indices(const T&) {
return {}; return {};
} }
template <size_t Num, typename T> template <size_t Num, class T>
constexpr auto get_right_indices(const T&) typename il_right<typename il_indices<T>::type, Num>::type
-> typename il_right<typename il_indices<T>::type, Num>::type { get_right_indices(const T&) {
return {}; return {};
} }
......
This diff is collapsed.
...@@ -312,21 +312,21 @@ std::function<optional<T>(const T&)> guarded(Predicate p, T value) { ...@@ -312,21 +312,21 @@ std::function<optional<T>(const T&)> guarded(Predicate p, T value) {
// special case covering arg_match as argument to guarded() // special case covering arg_match as argument to guarded()
template <class T, typename Predicate> template <class T, typename Predicate>
unit_t guarded(Predicate, const detail::wrapped<T>&) { unit_t guarded(Predicate, const detail::wrapped<T>&) {
return {}; return unit;
} }
inline unit_t to_guard(const anything&) { inline unit_t to_guard(const anything&) {
return {}; return unit;
} }
template <class T> template <class T>
unit_t to_guard(detail::wrapped<T> (*)()) { unit_t to_guard(detail::wrapped<T> (*)()) {
return {}; return unit;
} }
template <class T> template <class T>
unit_t to_guard(const detail::wrapped<T>&) { unit_t to_guard(const detail::wrapped<T>&) {
return {}; return unit;
} }
template <class T> template <class T>
...@@ -385,7 +385,7 @@ decltype(on(A0, A1, A2, val<Ts>()...)) on() { ...@@ -385,7 +385,7 @@ decltype(on(A0, A1, A2, val<Ts>()...)) on() {
} }
template <atom_value A0, atom_value A1, atom_value A2, atom_value A3, template <atom_value A0, atom_value A1, atom_value A2, atom_value A3,
class... Ts> class... Ts>
decltype(on(A0, A1, A2, A3, val<Ts>()...)) on() { decltype(on(A0, A1, A2, A3, val<Ts>()...)) on() {
return on(A0, A1, A2, A3, val<Ts>()...); return on(A0, A1, A2, A3, val<Ts>()...);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment