Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
  • Loading branch information
Klaim and jjerphan authored Apr 5, 2024
1 parent 1bd7f2b commit 2efac9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/sparrow/mp_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ namespace sparrow::mpl
template< typename TList >
concept any_typelist = is_type_instance_of_v<TList, typelist>;

// TODO: document this!
template <class T, bool is_const>
struct constify
: std::conditional<is_const, const T, T>
{
};

// `constify_t` is required since `std::add_const_t<T&>`
// is not `const T&` but `T&`.
template <class T, bool is_const>
using constify_t = typename constify<T, is_const>::type;

Expand Down

0 comments on commit 2efac9c

Please sign in to comment.