<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJylVE2P2yAQ_TX4MtrIMUkcH3zYJO2lh14q9Qz2xKbFYPGRNP--YydeZ3ezq0pFCAaGGd4Mb5C2vpQ_EY42mhrOKrTANumTDzXjh4plO-rLnLbA9kFZA9FjDXstTAOVMGBsgMp2vdIIXnU9Tb2zjRMd-NaeDUjU9sz4M0sPLJ3GTXrr12XGlal0rBEY34dIThj_8kh3wipYNyvH0YgOfS-qIQh7U-S7-xMnq-qrJIVj2ZZlxdtz-eHeYAz_mfp04R5qG6UeQNzuFn2vL-SLojc-wOcW2YZl-388Ce_RATgM0RkYdggpf4x6DtNF8zBM-Px2oM3Z-c1iThnfwbvGsq_U4fu36fhLXgZfFDRNcG98M_jhFHoIduDTDGoyJgM4Otu94gM5O7eqaol3ZOSB2IfOWXdlbWgRhGtihyb4CcxAiFeOH6B6E8Gc0_ww6ZBKwx7hEdHGUZlwFTqhPkr8C5T5bd4_41QXSV3yuuCFSEQMrXWl-q2CuIhOJNHpsg2h94O3EV5D4Ue5oCqkhdanaXqiQvxFr0xL5X1ET8Kap9tV0pbZcbXZHLco15jymlcrjsWySou8yKRMC0y0oML1JVvTB5AZPMPogmS2PiT_j0CVWZpl6TLdpktq-YLLY5UvZbWVhSxyLtkqRcqmXgx-FtY1iStHlzI2npRa-eBnpfBeNQZxBEwIgwoay-s3Rf-HdY5g6At41CT4x4w7t-hwICQRPvdwr1IGtK2EvuMA_hkgJGNg5RjVX8XniMs>53084</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Clang incorrectly selects std::apply() where user's apply() in local namespace exists
        </td>
    </tr>

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

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

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

<pre>
    We found with `-std=c++17` option used Clang can not compile simple program shown below:

```
#include <tuple>
#include <vector>

namespace foo
{

void
bar()
{
}

std::vector< double >
apply( const std::vector< double >&, const std::vector< double >& )
{
  return {};
}

void
run()
{
  std::vector< double > vec;

  bar();                  // OK
  apply( vec, vec );      // Tries to use std::apply() from <tuple>, which causes an error with the arguments
  foo::apply( vec, vec ); // OK
}
} // end of namespace foo

int
main()
{
  foo::run();
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNVE2T2yAM_TX4otmMA3GcHHzYJO2lh1460zNgYtNi8PCRNP--shOvs5t0px4GBELSe0KycPWl-qng6JKt4axjC2Sdv4RYE3aQhO5wLEs8AtdH7SykoGrYG24bkNyCdRGk63ptFATd9bj03jWedxBad7YglHFnwl5JfiD5NK_z27huKdNWmlQrIGwfEzoh7Msz3UnJ6PysHGfLOxV6LgcS7qYod_c3Tk7XV0lwT-iG0O3He-Xh3mCk_4pjCriH2iVhBhC32LzvzQV9IXsbInxuQdeE7v_zJjyiA_AqJm9hOEGk7DnqmaZP9ilN-Dw64OHs_GYxp4zt4OEj9CsO-P5tuv6Wl8EXksYF7o1vBj-8VgGiG-ppBjUZowEcveve1QM6O7datlh3aBQAq0957_y1amOrgPsmdcrGMIEZCuKd4yeoPjCYc1oeJp3C1nBHeFZo46xtvAod1_9K_BuU-W0en3Hqi6yuWL1lW55FHY2qrv2GjeC8x3czFwjKoBCep-7cKq-GzOLLlQHuVdqCcZKbOzLqjw4xZMmbqo2xD4O_kXeDeU1ige2NG2NO0_KCHf4Lo-NWh5BUQKFg-WaVtRVnrFhvi3W-rGUtj4WkqhCbo5IFXYllyTPD8Y8QKlLgn4VadYbRBcqkOGS6ojml-TLf5Ev8ygUTR1kuhdyIrdiWTJBVrjDJZjHgWDjfZL4aIYnUBFSagcqs5CHoxio1hkP_PMXW-Ur_1pFfeMezMXg1gv8Lh95zqw">