[libc-commits] [PATCH] D148739: [libc] Use __builtin_bit_cast only when src and dest types are trivially copyable

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Apr 19 13:26:15 PDT 2023


sivachandra added inline comments.


================
Comment at: libc/src/__support/CPP/bit.h:14
 
+#include <type_traits>
+
----------------
We cannot use the C++ standard library in the runtime components of the libc. Would marking the copy constructor with `= default` solve your problem: https://github.com/llvm/llvm-project/blob/main/libc/src/__support/UInt.h#L40


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148739



More information about the libc-commits mailing list