#ifndef BEAST_UTILITY_MAYBE_CONST_H_INCLUDED #define BEAST_UTILITY_MAYBE_CONST_H_INCLUDED #include namespace beast { /** Makes T const or non const depending on a bool. */ template struct maybe_const { explicit maybe_const() = default; using type = typename std::conditional< IsConst, typename std::remove_const::type const, typename std::remove_const::type>::type; }; /** Alias for omitting `typename`. */ template using maybe_const_t = typename maybe_const::type; } // namespace beast #endif