32
Concurrency support library
[thread]
32.4
Threads
[thread.threads]
32.4.3
Class
thread
[thread.thread.class]
32.4.3.2
Thread attributes
[thread.attributes]
32.4.3.2.2
Class
thread::name_
hint
[thread.attributes.hint]
🔗
namespace
std
{
template
<
same_
as
<
char
>
T
>
class
thread
::
name_hint
{
public
:
constexpr
explicit
name_hint
(
basic_string_view
<
T
>
n
)
noexcept
; name_hint
(
name_hint
&
&
)
=
delete
; name_hint
(
const
name_hint
&
)
=
delete
;
private
:
basic_string_view
<
T
>
name
;
//
exposition only
}
;
}
1
#
The
name_
hint
thread attribute can be used to set the name of a thread for debugging purposes or platform-specific display mechanisms
.
Recommended practice
: Implementations should not store the value of the
name_
hint
attribute in the
thread
or
jthread
object
.
Recommended practice
:
name
is interpreted as a string in the associated character encoding of
T
(Table
12
)
.
🔗
constexpr
explicit
name_hint
(
basic_string_view
<
T
>
n
)
noexcept
;
2
#
Effects
: Initializes
name
with
n
.