Skip to content

[libc++] Add <locale> include in <chrono> #85521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

philnik777
Copy link
Contributor

I accidentally removed this transitive include in #85478.

@philnik777 philnik777 requested a review from a team as a code owner March 16, 2024 13:12
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Mar 16, 2024
@llvmbot
Copy link
Member

llvmbot commented Mar 16, 2024

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

Changes

I accidentally removed this transitive include in #85478.


Full diff: https://github.com/llvm/llvm-project/pull/85521.diff

2 Files Affected:

  • (modified) libcxx/include/chrono (+1)
  • (modified) libcxx/test/libcxx/transitive_includes/cxx20.csv (+1)
diff --git a/libcxx/include/chrono b/libcxx/include/chrono
index 0320c1dc4c2f96..5bab3f8ad5cf05 100644
--- a/libcxx/include/chrono
+++ b/libcxx/include/chrono
@@ -883,6 +883,7 @@ constexpr chrono::year                                  operator ""y(unsigned lo
 
 #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER == 20
 #  include <charconv>
+#  include <locale>
 #endif
 
 #endif // _LIBCPP_CHRONO
diff --git a/libcxx/test/libcxx/transitive_includes/cxx20.csv b/libcxx/test/libcxx/transitive_includes/cxx20.csv
index b355e7b0338b9f..03b4eda8b4d868 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx20.csv
@@ -128,6 +128,7 @@ chrono ctime
 chrono cwchar
 chrono forward_list
 chrono limits
+chrono locale
 chrono optional
 chrono ostream
 chrono ratio

Copy link
Member

@mordante mordante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM!

@philnik777
Copy link
Contributor Author

The CI failure is unrelated.

@philnik777 philnik777 merged commit f694f63 into llvm:main Mar 16, 2024
@philnik777 philnik777 deleted the add_chrono_locale_include branch March 16, 2024 15:40
var-const added a commit that referenced this pull request Jul 8, 2024
blueboxd pushed a commit to blueboxd/libcxx that referenced this pull request Apr 19, 2025
…ro (#97869)

This is a follow-up to llvm/llvm-project#85521,
similar to llvm/llvm-project#95686.

NOKEYCHECK=True
GitOrigin-RevId: 5789ee28772d942da113762f45fa5f47996b55d7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants