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

    <tr>
        <th>Summary</th>
        <td>
            declaration conflicts with abs
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          Master-Chi
      </td>
    </tr>
</table>

<pre>
    Dear, community
    I am running into a problem when compiling opencv2 using clang+llvm-15.0.6-x86_64-linux-gnu-ubuntu-18.04. The error message showed a conflict in the declaration of the abs function in complex and cmath. However, I don't know how to solve this problem as it seems that both are in the std namespace.


In file included from /home/temp/algorithm-libs/mi_v1.0.0-qsee/src/opencv2/core/src/algorithm.cpp:43:
In file included from /home/temp/algorithm-libs/mi_v1.0.0-qsee/src/opencv2/core/src/precomp.hpp:48:
In file included from /home/temp/algorithm-libs/mi_v1.0.0-qsee/src/opencv2/core/include/opencv2/core/core.hpp:56:
/home/temp/toolchains/clang/bin/../include/c++/v1/complex:854:1: error: declaration conflicts with target of using declaration already in scope0m
abs(const complex<_Tp>& __c)
^
/home/temp/toolchains/clang/bin/../include/c++/v1/cmath:339:1: note: target of using declaration
using ::abs _LIBCPP_USING_IF_EXISTS;
^
/home/temp/toolchains/clang/bin/../include/c++/v1/cmath:339:9: note: using declaration
using ::abs _LIBCPP_USING_IF_EXISTS;
^
In file included from /home/temp/algorithm-libs/mi_v1.0.0-qsee/src/opencv2/core/src/algorithm.cpp:43:
In file included from /home/temp/algorithm-libs/mi_v1.0.0-qsee/src/opencv2/core/src/precomp.hpp:48:
In file included from /home/temp/algorithm-libs/mi_v1.0.0-qsee/src/opencv2/core/include/opencv2/core/core.hpp:56:
/home/temp/toolchains/clang/bin/../include/c++/v1/complex:911:16: error: reference to unresolved using declaration
return abs(__c.real());
^
/home/temp/toolchains/clang/bin/../include/c++/v1/cmath:339:1: note: using declaration annotated with 'using_if_exists' here
using ::abs _LIBCPP_USING_IF_EXISTS;
^

Look forward to your reply
BRs
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsVk1v4zYQ_TX0ZWBBoj4sHXSws6vWwLZYNCnQm0BRI5FdilRJyk7-fUHJyWbRNpcucmkBQ7SHo5k3w_fMYc7JUSPWJD-R_MOOLV4YW__EnEe7vxNy15n-qf6AzBJ6B9xM06KlfyLxBxIfAQDOwCawi9ZSjyC1N8BgtqZTOMFVoA7vzFKFXTOj5hcKiwu_uGJ6JPSk1GXaJ3kUR8X-sSzaItsrqZfH_aiX_dIt2i_7pIziLIIHgYDWGgsTOsdGBCfMFXtgwI0elOQepAYvEHrkilnmpdFghtXEOgfDovlqkxswhY_AdA98Yl5E8KO54gXXUs_QG03owcMXba4gzBW8AWfUBcEL6V6KZA6kB4c4OfCCeeiMF8AsPkNxvgfNJnQz4xhtnXv9PGsYpAruXC099jBYMwGhjTATEtp4nGZCG6ZGY6UX017JzhHaTLK9JFEcxfs_HAZHZzmhza3LhDbc2K_ml9cjPs8kPWYpSd8VwGwxdDwSW_ry3dLf4v7dVlhugPLiBdBfUntjFBdM6pD2xtumk5rQJoq-ycAJPa2f5pKs8VeKkfRY5hlJjwlJjxuDw5fXHH3mr4Or9AI8syP6wNxNLK9dmbLI-qdAL8fNjPG0wWahKyU32nl4SXzXPswk_UhoAW3LCa1uJeYfv3utQUIkPaZp9VypNh7D-kY1G4rNHA4gDWVA--l8uvv8uf31_vzzD-25aT_-dr5_uCfp6Z3gV6_hf2_Q_wv-PyD4KgkSSIpvFG9xQIuaY7hLFm1xvU_6f2KYRb9YDZuw25ZHFpkitAwyptX7qSF5Uw3AtDaeeey3_y5CD6tPK4cWH6XzjtADCLT4b8W-Pj8Z8wUGY6_M9qGNT2axYHFWt6Hk9Ivb9XXaV2nFdlgnRVXlVXkosp2oy7IohjyNaU85S4aqy4ayYt2hKw5F0mf5TtY0pmmSJHFcZEWcRbTPu_TAq6xjRV4hJ1mME5MqCmNLZOy4k84tWB-Ssip2inWo3DpMUarxCusmoTTMVrZeR51uGR3JYhUa8zWKl15h_caNwDq3W6yqhfezC82jDaHNKL1YuoibidAmBLst-9ma35H7cMYBQjj_FeKfAQAA___OFitE">