@@ -291,10 +291,12 @@ class DirichletBC
291
291
// / @note The size of of `g` must be equal to the block size if `V`.
292
292
// / Use the Function version if this is not the case, e.g. for some
293
293
// / mixed spaces.
294
- template <typename S, std::convertible_to<std::vector<std:: int32_t >> X,
294
+ template <typename S, typename X,
295
295
typename
296
296
= std::enable_if_t <std::is_convertible_v<S, T>
297
297
or std::is_convertible_v<S, std::span<const T>>>>
298
+ requires std::is_convertible_v<std::remove_cvref_t <X>,
299
+ std::vector<std::int32_t >>
298
300
DirichletBC (const S& g, X&& dofs, std::shared_ptr<const FunctionSpace<U>> V)
299
301
: DirichletBC(std::make_shared<Constant<T>>(g), dofs, V)
300
302
{
@@ -315,7 +317,9 @@ class DirichletBC
315
317
// / @note The size of of `g` must be equal to the block size if `V`.
316
318
// / Use the Function version if this is not the case, e.g. for some
317
319
// / mixed spaces.
318
- template <std::convertible_to<std::vector<std::int32_t >> X>
320
+ template <typename X>
321
+ requires std::is_convertible_v<std::remove_cvref_t <X>,
322
+ std::vector<std::int32_t >>
319
323
DirichletBC (std::shared_ptr<const Constant<T>> g, X&& dofs,
320
324
std::shared_ptr<const FunctionSpace<U>> V)
321
325
: _function_space(V), _g(g), _dofs0(std::forward<X>(dofs)),
@@ -363,7 +367,9 @@ class DirichletBC
363
367
// / @note The indices in `dofs` are for *blocks*, e.g. a block index
364
368
// / corresponds to 3 degrees-of-freedom if the dofmap associated with
365
369
// / `g` has block size 3.
366
- template <std::convertible_to<std::vector<std::int32_t >> X>
370
+ template <typename X>
371
+ requires std::is_convertible_v<std::remove_cvref_t <X>,
372
+ std::vector<std::int32_t >>
367
373
DirichletBC (std::shared_ptr<const Function<T, U>> g, X&& dofs)
368
374
: _function_space(g->function_space ()), _g(g),
369
375
_dofs0(std::forward<X>(dofs)),
0 commit comments