[libcxx-commits] [PATCH] D153319: [libcxx] <experimental/simd> Added aliagned flag types, traits is_simd_flag_type[_v], memory_alignment[_v] and related tests

Yin Zhang via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jul 21 02:42:42 PDT 2023


Joy12138 added inline comments.


================
Comment at: libcxx/include/__bit/bit_ceil.h:32
+  if (sizeof(_Tp) >= sizeof(unsigned))
+    return (_Tp){1} << __n;
   else {
----------------
philnik wrote:
> 
Seems we can't use brace-initialization of scalar types in C++03.

I tried to fix using:

```
    return static_cast<_Tp>(1) << __n;
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153319



More information about the libcxx-commits mailing list