TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 229 subscribers
Post #24465 27
How do compilers execute constexpr/consteval functions when you are cross-compiling?

I assume that you can not just compile and run for the host platform, since e.g. long can have a different size on the target platform.

Can the compiler just use the type sizes of the target platform, and then execute natively?

Can this problem be solved in different ways?

https://redd.it/1pj8qxk
@r_cpp
Reddit From the cpp community on Reddit Explore this post and more from the cpp community
More from @r_cpp
  1. Oct 11, 2026Right way to test async code https://redd.it/1x2wqgz @r_cpp
  2. Oct 10, 2026Yantra: an LALR(1) parser generator for C++23 Yantra: an LALR(1) parser generator for C++2…
  3. Oct 10, 2026Opting in, and back out again https://dryperspective.github.io/posts/opting-in/ https://re…
  4. Oct 10, 2026I’m Building Bursztyn OS a Polish Operating System From Scratch I’m building Bursztyn OS,…
  5. Oct 9, 2026std::variant, operator== and pattern matching I was thinking, wouldn't adding equality com…
  6. Oct 8, 2026Profiles for simplicity and guarantees - Bjarne Stroustrup - CppCon 2026 https://youtu.be/…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →