alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
include
alpaka
mem
concepts
AssignableFrom.hpp
Go to the documentation of this file.
1
/* Copyright 2026 René Widera
2
* SPDX-License-Identifier: MPL-2.0
3
*/
4
5
#pragma once
6
7
#include "
alpaka/trait.hpp
"
8
#include "
alpaka/unused.hpp
"
9
10
#include <concepts>
11
12
namespace
alpaka::concepts
13
{
14
/** Check whether the specified data type T_To can be assigned to T_From
15
*
16
* Read the check as a variable of the type T_From is assigned to a variable of the type T_To.
17
*
18
* @attention it is not equal to std::is_assignable
19
*
20
* Equivalent to execute:
21
*
22
* @code
23
* T_To to;
24
* T_From from;
25
* to = foo;
26
* @endcode
27
*/
28
template
<
typename
T_To,
typename
T_From>
29
concept
AssignableFrom
=
requires
(T_To to, T_From from) { to = from; };
30
}
// namespace alpaka::concepts
alpaka::concepts::AssignableFrom
Check whether the specified data type T_To can be assigned to T_From.
Definition
AssignableFrom.hpp:29
alpaka::concepts
Definition
api.hpp:32
trait.hpp
unused.hpp
Generated on
for alpaka by
1.16.1