* non-@p const view to a @p const view, akin to converting a non-@p const
* pointer to a @p const pointer.
*/
- ArrayView(const ArrayView<typename std::remove_cv<value_type>::type,
- MemorySpaceType> &view);
+ ArrayView(
+ const ArrayView<std::remove_cv_t<value_type>, MemorySpaceType> &view);
/**
* A constructor that automatically creates a view from a single value_type
* You cannot initialize ArrayView objects to non-@p const memory with
* such arguments, such as <code>ArrayView@<double@></code>.
*/
- ArrayView(
- const std::vector<typename std::remove_cv<value_type>::type> &vector);
+ ArrayView(const std::vector<std::remove_cv_t<value_type>> &vector);
/**
* A constructor that automatically creates a view from a std::vector object.
* <code>ArrayView@<const double@></code>, or to non-@p const memory,
* such as <code>ArrayView@<double@></code>.
*/
- ArrayView(std::vector<typename std::remove_cv<value_type>::type> &vector);
+ ArrayView(std::vector<std::remove_cv_t<value_type>> &vector);
/**
* A constructor that automatically creates a view for a given C-style array.
* a std::array.
*/
template <std::size_t N>
- ArrayView(
- const std::array<typename std::remove_cv<value_type>::type, N> &vector);
+ ArrayView(const std::array<std::remove_cv_t<value_type>, N> &vector);
/**
* A constructor that automatically creates a view from a std::array object.
* a std::array.
*/
template <std::size_t N>
- ArrayView(std::array<typename std::remove_cv<value_type>::type, N> &vector);
+ ArrayView(std::array<std::remove_cv_t<value_type>, N> &vector);
/**
* Reinitialize a view.
* This version always compares with the non-const value_type.
*/
bool
- operator==(const ArrayView<typename std::remove_cv<value_type>::type,
- MemorySpaceType> &other_view) const;
+ operator==(const ArrayView<std::remove_cv_t<value_type>, MemorySpaceType>
+ &other_view) const;
/**
* Compare two ArrayView objects of the same type. Two objects are considered
* This version always compares with the non-const value_type.
*/
bool
- operator!=(const ArrayView<typename std::remove_cv<value_type>::type,
- MemorySpaceType> &other_view) const;
+ operator!=(const ArrayView<std::remove_cv_t<value_type>, MemorySpaceType>
+ &other_view) const;
/**
* Return the size (in elements) of the view of memory this object
template <typename ElementType, typename MemorySpaceType>
inline ArrayView<ElementType, MemorySpaceType>::ArrayView(
- const ArrayView<typename std::remove_cv<value_type>::type, MemorySpaceType>
- &view)
+ const ArrayView<std::remove_cv_t<value_type>, MemorySpaceType> &view)
: starting_element(view.starting_element)
, n_elements(view.n_elements)
{}
template <typename ElementType, typename MemorySpaceType>
inline ArrayView<ElementType, MemorySpaceType>::ArrayView(
- const std::vector<typename std::remove_cv<value_type>::type> &vector)
+ const std::vector<std::remove_cv_t<value_type>> &vector)
: // use delegating constructor
ArrayView(vector.data(), vector.size())
{
template <typename ElementType, typename MemorySpaceType>
inline ArrayView<ElementType, MemorySpaceType>::ArrayView(
- std::vector<typename std::remove_cv<value_type>::type> &vector)
+ std::vector<std::remove_cv_t<value_type>> &vector)
: // use delegating constructor
ArrayView(vector.data(), vector.size())
{}
template <typename ElementType, typename MemorySpaceType>
template <std::size_t N>
inline ArrayView<ElementType, MemorySpaceType>::ArrayView(
- const std::array<typename std::remove_cv<value_type>::type, N> &vector)
+ const std::array<std::remove_cv_t<value_type>, N> &vector)
: // use delegating constructor
ArrayView(vector.data(), vector.size())
{
template <typename ElementType, typename MemorySpaceType>
template <std::size_t N>
inline ArrayView<ElementType, MemorySpaceType>::ArrayView(
- std::array<typename std::remove_cv<value_type>::type, N> &vector)
+ std::array<std::remove_cv_t<value_type>, N> &vector)
: // use delegating constructor
ArrayView(vector.data(), vector.size())
{}
template <typename ElementType, typename MemorySpaceType>
inline bool
ArrayView<ElementType, MemorySpaceType>::operator==(
- const ArrayView<typename std::remove_cv<value_type>::type, MemorySpaceType>
- &other_view) const
+ const ArrayView<std::remove_cv_t<value_type>, MemorySpaceType> &other_view)
+ const
{
return (other_view.data() == starting_element) &&
(other_view.size() == n_elements);
template <typename ElementType, typename MemorySpaceType>
inline bool
ArrayView<ElementType, MemorySpaceType>::operator!=(
- const ArrayView<typename std::remove_cv<value_type>::type, MemorySpaceType>
- &other_view) const
+ const ArrayView<std::remove_cv_t<value_type>, MemorySpaceType> &other_view)
+ const
{
return !(*this == other_view);
}
* An alias to the stored std::tuple type. Only copy constructible
* objects are allowed as tuple members.
*/
- using TupleType = std::tuple<typename std::remove_cv<
- typename std::remove_reference<FunctionArgs>::type>::type...>;
+ using TupleType =
+ std::tuple<std::remove_cv_t<std::remove_reference_t<FunctionArgs>>...>;
/**
* Construct a MutableBind object specifying the function, and
{
// `OtherNumber` is either `const Number` (evaluate()) or `Number`
// (integrate())
- static_assert(
- std::is_same_v<Number, typename std::remove_const<OtherNumber>::type>,
- "Type of Number and of OtherNumber do not match.");
+ static_assert(std::is_same_v<Number, std::remove_const_t<OtherNumber>>,
+ "Type of Number and of OtherNumber do not match.");
const auto element_type = fe_eval.get_shape_info().element_type;
using ElementType = MatrixFreeFunctions::ElementType;
for (unsigned int d = 0; d < n_components; ++d)
src_data.second[d] = get_shared_vector_data(
const_cast<typename internal::BlockVectorSelector<
- typename std::remove_const<VectorType>::type,
- IsBlockVector<typename std::remove_const<VectorType>::type>::value>::
- BaseVectorType *>(src_data.first[d]),
+ std::remove_const_t<VectorType>,
+ IsBlockVector<std::remove_const_t<VectorType>>::value>::BaseVectorType
+ *>(src_data.first[d]),
is_valid_mode_for_sm,
active_fe_index,
dof_info);
static const bool value =
has_begin<T> &&
(has_local_element<T> ||
- is_serial_vector<typename std::remove_const<T>::type>::value) &&
+ is_serial_vector<std::remove_const_t<T>>::value) &&
std::is_same_v<typename T::value_type, Number>;
};
# endif
)
: vector_ptr(
- create_nvector(
- new NVectorContent<typename std::remove_const<VectorType>::type>(
- &vector)
+ create_nvector(new NVectorContent<std::remove_const_t<VectorType>>(
+ &vector)
# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0)
- ,
- nvector_context
+ ,
+ nvector_context
# endif
- ),
+ ),
[](N_Vector v) { N_VDestroy(v); })
{}
constexpr bool
is_const_reference()
{
- return std::is_reference_v<T> &&
- std::is_const_v<typename std::remove_reference<T>::type>;
+ return std::is_reference_v<T> && std::is_const_v<std::remove_reference_t<T>>;
}
void
constexpr bool
is_const_reference()
{
- return std::is_reference_v<T> &&
- std::is_const_v<typename std::remove_reference<T>::type>;
+ return std::is_reference_v<T> && std::is_const_v<std::remove_reference_t<T>>;
}
void
const FEValuesExtractors::Scalar &extractor,
const std::vector<NumberType> & local_dof_values)
{
- using View = typename std::remove_reference<
- typename std::remove_const<decltype(fe_values[extractor])>::type>::type;
+ using View = std::remove_reference_t<
+ std::remove_const_t<decltype(fe_values[extractor])>>;
const View & fe_values_view = fe_values[extractor];
const NumberType tolerance = std::is_same_v<NumberType, float> ? 1e-5 : 1e-13;
const FEValuesExtractors::Vector &extractor,
const std::vector<NumberType> & local_dof_values)
{
- using View = typename std::remove_reference<
- typename std::remove_const<decltype(fe_values[extractor])>::type>::type;
+ using View = std::remove_reference_t<
+ std::remove_const_t<decltype(fe_values[extractor])>>;
const View & fe_values_view = fe_values[extractor];
const NumberType tolerance = std::is_same_v<NumberType, float> ? 1e-5 : 1e-13;
const FEValuesExtractors::SymmetricTensor<2> &extractor,
const std::vector<NumberType> & local_dof_values)
{
- using View = typename std::remove_reference<
- typename std::remove_const<decltype(fe_values[extractor])>::type>::type;
+ using View = std::remove_reference_t<
+ std::remove_const_t<decltype(fe_values[extractor])>>;
const View & fe_values_view = fe_values[extractor];
const NumberType tolerance = std::is_same_v<NumberType, float> ? 1e-5 : 1e-13;
const FEValuesExtractors::Tensor<2> &extractor,
const std::vector<NumberType> & local_dof_values)
{
- using View = typename std::remove_reference<
- typename std::remove_const<decltype(fe_values[extractor])>::type>::type;
+ using View = std::remove_reference_t<
+ std::remove_const_t<decltype(fe_values[extractor])>>;
const View &fe_values_view = fe_values[extractor];
// Typedefs
const FEValuesExtractors::Scalar &extractor,
const std::vector<NumberType> & local_dof_values)
{
- using View = typename std::remove_reference<
- typename std::remove_const<decltype(fe_values[extractor])>::type>::type;
+ using View = std::remove_reference_t<
+ std::remove_const_t<decltype(fe_values[extractor])>>;
const View &fe_values_view = fe_values[extractor];
// Typedefs
const FEValuesExtractors::Vector &extractor,
const std::vector<NumberType> & local_dof_values)
{
- using View = typename std::remove_reference<
- typename std::remove_const<decltype(fe_values[extractor])>::type>::type;
+ using View = std::remove_reference_t<
+ std::remove_const_t<decltype(fe_values[extractor])>>;
const View &fe_values_view = fe_values[extractor];
// Typedefs
const FEValuesExtractors::SymmetricTensor<2> &extractor,
const std::vector<NumberType> & local_dof_values)
{
- using View = typename std::remove_reference<
- typename std::remove_const<decltype(fe_values[extractor])>::type>::type;
+ using View = std::remove_reference_t<
+ std::remove_const_t<decltype(fe_values[extractor])>>;
const View &fe_values_view = fe_values[extractor];
// Typedefs
const FEValuesExtractors::Tensor<2> &extractor,
const std::vector<NumberType> & local_dof_values)
{
- using View = typename std::remove_reference<
- typename std::remove_const<decltype(fe_values[extractor])>::type>::type;
+ using View = std::remove_reference_t<
+ std::remove_const_t<decltype(fe_values[extractor])>>;
const View &fe_values_view = fe_values[extractor];
// Typedefs
const FEValuesExtractors::Scalar &extractor,
const std::vector<NumberType> & local_dof_values)
{
- using View = typename std::remove_reference<
- typename std::remove_const<decltype(fe_iv[extractor])>::type>::type;
+ using View =
+ std::remove_reference_t<std::remove_const_t<decltype(fe_iv[extractor])>>;
const View &fe_iv_view = fe_iv[extractor];
// Typedefs
const FEValuesExtractors::Vector &extractor,
const std::vector<NumberType> & local_dof_values)
{
- using View = typename std::remove_reference<
- typename std::remove_const<decltype(fe_iv[extractor])>::type>::type;
+ using View =
+ std::remove_reference_t<std::remove_const_t<decltype(fe_iv[extractor])>>;
const View &fe_iv_view = fe_iv[extractor];
// Typedefs
const FEValuesExtractors::Scalar &extractor,
const std::vector<NumberType> & local_dof_values)
{
- using View = typename std::remove_reference<
- typename std::remove_const<decltype(fe_iv[extractor])>::type>::type;
+ using View =
+ std::remove_reference_t<std::remove_const_t<decltype(fe_iv[extractor])>>;
const View &fe_iv_view = fe_iv[extractor];
// Typedefs
const FEValuesExtractors::Vector &extractor,
const std::vector<NumberType> & local_dof_values)
{
- using View = typename std::remove_reference<
- typename std::remove_const<decltype(fe_iv[extractor])>::type>::type;
+ using View =
+ std::remove_reference_t<std::remove_const_t<decltype(fe_iv[extractor])>>;
const View &fe_iv_view = fe_iv[extractor];
// Typedefs
auto & x,
auto & b) -> std::pair<unsigned int, double> {
ReductionControl reduction_control(2000, 1e-7, 1e-2);
- SolverCG<typename std::remove_reference<decltype(x)>::type> solver(
- reduction_control);
+ SolverCG<std::remove_reference_t<decltype(x)>> solver(reduction_control);
solver.solve(poisson_operator, x, b, PreconditionIdentity());
[&](const auto &poisson_operator,
auto & x,
auto & b) -> std::pair<unsigned int, double> {
- ReductionControl reduction_control;
- SolverCG<typename std::remove_reference<decltype(x)>::type> solver(
- reduction_control);
+ ReductionControl reduction_control;
+ SolverCG<std::remove_reference_t<decltype(x)>> solver(reduction_control);
solver.solve(poisson_operator, x, b, PreconditionIdentity());
if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
auto & x,
auto & b) -> std::tuple<unsigned int, double, double, double> {
ReductionControl reduction_control(1000, 1e-10, 1e-4);
- SolverCG<typename std::remove_reference<decltype(x)>::type> solver(
- reduction_control);
+ SolverCG<std::remove_reference_t<decltype(x)>> solver(reduction_control);
solver.solve(poisson_operator, x, b, PreconditionIdentity());
if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
auto & x,
auto & b) -> std::pair<unsigned int, double> {
ReductionControl reduction_control(1000, 1e-7, 1e-3);
- SolverCG<typename std::remove_reference<decltype(x)>::type> solver(
- reduction_control);
+ SolverCG<std::remove_reference_t<decltype(x)>> solver(reduction_control);
try
{
auto & x,
auto & b) -> std::pair<unsigned int, double> {
ReductionControl reduction_control(2000, 1e-7, 1e-2);
- SolverCG<typename std::remove_reference<decltype(x)>::type> solver(
- reduction_control);
+ SolverCG<std::remove_reference_t<decltype(x)>> solver(reduction_control);
solver.solve(poisson_operator, x, b, PreconditionIdentity());