What is the longest name in C++?
Tags: cpp, api, fun
Published: 2021-12-23 09:33:01

---
title: What is the longest name in C++?
published: true
description: Find the longest identifier in C++20 Standard Library.
tags: cpp, api, fun
---

Question:
What is the longest identifier in C++20 Standard Library?

Answer:
https://github.com/yohhoy/cpp-longest-identifier

|identifier|len|since|
|:---|--:|:--|
|[`atomic_compare_exchange_strong_explicit`][acx]|39|C++11|
|[`hardware_constructive_interference_size`][hdis]|39|C++17|
|[`get_return_object_on_allocation_failure`][coro]|39|C++20|
|[`uninitialized_construct_using_allocator`][ucua]|39|C++20|
|[`propagate_on_container_copy_assignment`][pocca]|38|C++11|
|[`propagate_on_container_move_assignment`][pocca]|38|C++11|
|[`hardware_destructive_interference_size`][hdis]|38|C++17|
|[`is_pointer_interconvertible_with_class`][ipiwc]|38|C++20|
|[`atomic_compare_exchange_weak_explicit`][acx]|37|C++11|
|[`select_on_container_copy_construction`][sococ]|37|C++11|
|[`is_pointer_interconvertible_base_of_v`][ipibo]|37|C++20|
|[`is_trivially_default_constructible_v`][idc]|36|C++17|
|[`has_unique_object_representations_v`][huor]|35|C++17|
|[`is_pointer_interconvertible_base_of`][ipibo]|35|C++20|
|[`inappropriate_io_control_operation`][errc]|34|C++11|
|[`is_trivially_default_constructible`][idc]|34|C++11|
|[`is_nothrow_default_constructible_v`][idc]|34|C++17|
|[`indirectly_regular_unary_invocable`][iui]|34|C++20|
|[`atomic_flag_test_and_set_explicit`][aftas]|33|C++11|
|[`has_unique_object_representations`][huor]|33|C++17|
|[`is_trivially_copy_constructible_v`][icc]|33|C++17|
|[`is_trivially_move_constructible_v`][imc]|33|C++17|
|[`uninitialized_default_construct_n`][udcn]|33|C++17|
|[`lexicographical_compare_three_way`][lctw]|33|C++20|
|[`is_nothrow_default_constructible`][idc]|32|C++11|
|[`uses_allocator_construction_args`][uaca]|32|C++20|

[errc]:https://en.cppreference.com/w/cpp/error/errc
[hdis]:https://en.cppreference.com/w/cpp/thread/hardware_destructive_interference_size
[pocca]:https://en.cppreference.com/w/cpp/memory/allocator_traits
[sococ]:https://en.cppreference.com/w/cpp/memory/allocator_traits/select_on_container_copy_construction
[idc]:https://en.cppreference.com/w/cpp/types/is_default_constructible
[icc]:https://en.cppreference.com/w/cpp/types/is_copy_constructible
[imc]:https://en.cppreference.com/w/cpp/types/is_move_constructible
[huor]:https://en.cppreference.com/w/cpp/types/has_unique_object_representations
[udcn]:https://en.cppreference.com/w/cpp/memory/uninitialized_default_construct_n
[udc]:https://en.cppreference.com/w/cpp/memory/uninitialized_default_construct
[acx]:https://en.cppreference.com/w/cpp/atomic/atomic_compare_exchange
[aftas]:https://en.cppreference.com/w/cpp/atomic/atomic_flag_test_and_set
[coro]:https://en.cppreference.com/w/cpp/language/coroutines
[ucua]:https://en.cppreference.com/w/cpp/memory/uninitialized_construct_using_allocator
[ipiwc]:https://en.cppreference.com/w/cpp/types/is_pointer_interconvertible_with_class
[ipibo]:https://en.cppreference.com/w/cpp/types/is_pointer_interconvertible_base_of
[iui]:https://en.cppreference.com/w/cpp/iterator/indirectly_unary_invocable
[lctw]:https://en.cppreference.com/w/cpp/algorithm/lexicographical_compare_three_way
[uaca]:https://en.cppreference.com/w/cpp/memory/uses_allocator_construction_args