[libcxx-commits] [PATCH] D143329: [libc++] Move constexpr <cstring> functions into their own headers and remove unused <cstring> includes

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 17 09:12:22 PST 2023


philnik added inline comments.


================
Comment at: libcxx/include/__string/constexpr_c_functions.h:10
+#ifndef _LIBCPP___STRING_CONSTEXPR_C_FUNCTIONS_H
+#define _LIBCPP___STRING_CONSTEXPR_C_FUNCTIONS_H
+
----------------
Mordante wrote:
> philnik wrote:
> > Mordante wrote:
> > > I would name the file `constexpr_c_functions.h`, these are all private functions and not C functions, so the current name is slightly misleading.
> > I'm a bit confused. I guess you would like a different name, but your suggestion is identical to the current name. Did you forget to replace the name?
> > I'm a bit confused. I guess you would like a different name, but your suggestion is identical to the current name. Did you forget to replace the name?
> 
> Copy-paste error ;-)
> 
> I would name the file `constexpr_functions.h`, these are all private functions and not C functions, so the current name is slightly misleading.
I see your point, but I think `constexpr_functions.h` is very open. If you just read the name you would ask "What functions?". Although I admit that you could also read `constexpr_c_functions.h` as "all the C functions that are `constexpr`", I think it's closer to a good name. In case anybody has other suggestions we can still rename the file later.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143329/new/

https://reviews.llvm.org/D143329



More information about the libcxx-commits mailing list