<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57629>57629</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Boost fails to compile on riscv32 using clang-15/libc++
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          kraj
      </td>
    </tr>
</table>

<pre>
    The attached code fails to compile with `-stdlib=libc++` it comipiles fine with `-stdlib=libstdc++`

compiler cmdline

`clang++  -target riscv32 a.i -c`

Error
```
clang-15: warning: treating 'cpp-output' input as 'c++-cpp-output' when in C++ mode, this behavior is deprecated [-Wdeprecated]
In file included from /mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/boost/1.80.0-r0/boost_1_80_0/libs/locale/src/boost/locale/shared/message.cpp:22:
In file included from ./boost/locale/gnu_gettext.hpp:11:
In file included from ./boost/function.hpp:30:
In file included from ./boost/function/detail/prologue.hpp:17:
In file included from ./boost/function/function_base.hpp:21:
In file included from ./boost/type_index.hpp:29:
In file included from ./boost/type_index/stl_type_index.hpp:47:
In file included from ./boost/container_hash/hash.hpp:766:
In file included from ./boost/container_hash/extensions.hpp:22:
In file included from ./boost/detail/container_fwd.hpp:98:
/mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/boost/1.80.0-r0/recipe-sysroot/usr/include/c++/v1/complex:1093:18: error: no template named '__promote'
complex<typename __promote<_Tp, _Up>::type>
                 ^
/mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/boost/1.80.0-r0/recipe-sysroot/usr/include/c++/v1/complex:1096:30: error: no template named '__promote'
    typedef complex<typename __promote<_Tp, _Up>::type> result_type;
                             ^
/mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/boost/1.80.0-r0/recipe-sysroot/usr/include/c++/v1/complex:1105:22: error: no template named '__promote'
    complex<typename __promote<_Tp, _Up>::type>
                     ^
/mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/boost/1.80.0-r0/recipe-sysroot/usr/include/c++/v1/complex:1109:30: error: no template named '__promote'
    typedef complex<typename __promote<_Tp, _Up>::type> result_type;
                             ^
/mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/boost/1.80.0-r0/recipe-sysroot/usr/include/c++/v1/complex:1118:22: error: no template named '__promote'
    complex<typename __promote<_Tp, _Up>::type>
                     ^
/mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/boost/1.80.0-r0/recipe-sysroot/usr/include/c++/v1/complex:1122:30: error: no template named '__promote'
    typedef complex<typename __promote<_Tp, _Up>::type> result_type;
                             ^
In file included from /mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/boost/1.80.0-r0/boost_1_80_0/libs/locale/src/boost/locale/shared/message.cpp:22:
In file included from ./boost/locale/gnu_gettext.hpp:11:
In file included from ./boost/function.hpp:30:
In file included from ./boost/function/detail/prologue.hpp:17:
In file included from ./boost/function/function_base.hpp:22:
./boost/type_traits/has_trivial_copy.hpp:34:5: warning: builtin __has_trivial_copy is deprecated; use __is_trivially_copyable instead [-Wdeprecated-builtins]
   (__has_trivial_copy(T) && !is_reference<T>::value) && is_copy_constructible<T>::value
    ^
In file included from /mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/boost/1.80.0-r0/boost_1_80_0/libs/locale/src/boost/locale/shared/message.cpp:22:
In file included from ./boost/locale/gnu_gettext.hpp:11:
In file included from ./boost/function.hpp:30:
In file included from ./boost/function/detail/prologue.hpp:17:
In file included from ./boost/function/function_base.hpp:23:
./boost/type_traits/has_trivial_destructor.hpp:30:87: warning: builtin __has_trivial_destructor is deprecated; use __is_trivially_destructible instead [-Wdeprecated-builtins]
template <typename T> struct has_trivial_destructor : public integral_constant<bool, (__has_trivial_destructor(T) && is_destructible<T>::value)>{};
                                                                                      ^
In file included from /mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/boost/1.80.0-r0/boost_1_80_0/libs/locale/src/boost/locale/shared/message.cpp:25:
In file included from ./boost/unordered_map.hpp:17:
In file included from ./boost/unordered/unordered_map.hpp:22:
In file included from ./boost/unordered/detail/map.hpp:7:
In file included from ./boost/unordered/detail/implementation.hpp:43:
In file included from ./boost/type_traits/is_nothrow_move_assignable.hpp:16:
./boost/type_traits/has_nothrow_assign.hpp:65:8: warning: builtin __has_nothrow_assign is deprecated; use __is_nothrow_assignable instead [-Wdeprecated-builtins]
      (__has_nothrow_assign(T) && !is_volatile<T>::value && is_assignable<T&, const T&>::value)
       ^
3 warnings and 6 errors generated.
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztWFtvqzgQ_jXkxSLiEkh4yEObttK-d7WPyMAk-BywkW2S5t_vDAGSNG3VZM9K27ONCL4w83n8eWZsyFSxXz6XwLi1PC-hYLkqgK25qAyzClt1IypgO2FL5sSea2xRicwJH_CeO8E9XbHHhCVRQbKGrYV8RwPrRyXHe3C8u8O9H0ezvEZpCafPUDSvuNwcFBlzLdcbsEwLk2_DgPGpYG7-CvBRa6VH_f46DEVYrh854R3bcS0FImPVauAW68wJ5nnTuKq1TWuxwYTECuOme3Iwwj2X2JUgUYytehNr5NAJVsyWwrAMSr4VSjOsF9BoyLlFnp3o3v3r2Haih4N5f0jkDxkXMq_aAgXXWtU49FMtcaynDP97BdTmxoKmrlZUBZa2bvC-U_onFj05Lsq6SGj7QoJKGcLwpwtv6rnaG_pSP114KTVpjahQOa9oEKPzE8Vjd8k10Jg1GMM3MEU-kMQgwNtH05i-BbaRbYrraeHFTssOx_evwFm3MrdCyV439G7QxWoBFp0eK41Wldq0MNgyvw1vqKYZNwNWcM287L6BVMgCXgbt5CZtWi5bpRdws2smliuJ9EjQaclNiR1U9EDzOP4nSLjsIA0yZYZ5XuNF47Idcde7okdKFiPSvxZAGL-iAdfsjVaKHraGMHuLybA-4QVPW7-zs24qXBX0LC8JqSAjGXT5CitSMQsogkmBSV5Tpgj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