<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 8, 2016 at 7:44 AM, Krzysztof Parzyszek <span dir="ltr"><<a href="mailto:kparzysz@codeaurora.org" target="_blank">kparzysz@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This patch works very well. The infinite cleverness delivers again! :)<br>
<br>
There are still some failures left in check-libcxx, but they seem unrelated, except one:<br></blockquote><div><br></div><div><br></div><div>That error is related, but it's not really a problem, the tests just need to be disabled for FreeBSD.</div><div>The standard requires std::pair be a trivial type when its template argument types are, but as mentioned above</div><div>implementing this is ABI breaking.</div><div><br></div><div>/Eric</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
/usr/bin/CC -o /w/bld/org/projects/libcxx/tes<wbr>t/std/utilities/utility/pairs/<wbr>pairs.pair/Output/trivial_copy<wbr>_move.pass.cpp.o -x c++ /w/src/<a href="http://llvm.org/projects/libcxx/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/utilities/utility/p<wbr>airs/pairs.pair/trivial_copy_m<wbr>ove.pass.cpp</a> -c -v -Werror=thread-safety -std=c++1z -nostdinc++ -include /w/src/<a href="http://llvm.org/projects/libcxx/test/support/nasty_macros.hpp" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/support/nasty_macros.hp<wbr>p</a> -I/w/src/<a href="http://llvm.org/projects/libcxx/include" rel="noreferrer" target="_blank">llvm.org/projects/lib<wbr>cxx/include</a> -I/w/src/<a href="http://llvm.org/projects/libcxx/test/support" rel="noreferrer" target="_blank">llvm.org/projects/lib<wbr>cxx/test/support</a> -DLIBCXX_FILESYSTEM_STATIC_TES<wbr>T_ROOT="/w/src/<a href="http://llvm.org/projects/libcxx/test/std/experimental/filesystem/Inputs/static_test_env" rel="noreferrer" target="_blank">llvm.org/projec<wbr>ts/libcxx/test/std/experimenta<wbr>l/filesystem/Inputs/static_tes<wbr>t_env</a>" -DLIBCXX_FILESYSTEM_DYNAMIC_TE<wbr>ST_ROOT="/w/bld/org/projects/l<wbr>ibcxx/test/filesystem/Output/d<wbr>ynamic_env" -DLIBCXX_FILESYSTEM_DYNAMIC_TE<wbr>ST_HELPER="/usr/local/bin/pyth<wbr>on2.7 /w/src/<a href="http://llvm.org/projects/libcxx/test/support/filesystem_dynamic_test_helper.py" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/support/filesystem_dyna<wbr>mic_test_helper.py</a>" -c<br>
<br>
<br>
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)<span><br>
Target: x86_64-unknown-freebsd11.0<br>
Thread model: posix<br></span>
InstalledDir: /usr/bin<br>
"/usr/bin/c++" -cc1 -triple x86_64-unknown-freebsd11.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name trivial_copy_move.pass.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -v -dwarf-column-info -debugger-tuning=gdb -coverage-file /w/bld/org/projects/libcxx/tes<wbr>t/std/utilities/utility/pairs/<wbr>pairs.pair/Output/trivial_copy<wbr>_move.pass.cpp.o -nostdinc++ -resource-dir /usr/bin/../lib/clang/3.8.0 -include /w/src/<a href="http://llvm.org/projects/libcxx/test/support/nasty_macros.hpp" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/support/nasty_macros.hp<wbr>p</a> -I /w/src/<a href="http://llvm.org/projects/libcxx/include" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/include</a> -I /w/src/<a href="http://llvm.org/projects/libcxx/test/support" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/support</a> -D LIBCXX_FILESYSTEM_STATIC_TEST_<wbr>ROOT=/w/src/<a href="http://llvm.org/projects/libcxx/test/std/experimental/filesystem/Inputs/static_test_env" rel="noreferrer" target="_blank">llvm.org/projects/<wbr>libcxx/test/std/experimental/f<wbr>ilesystem/Inputs/static_test_e<wbr>nv</a> -D LIBCXX_FILESYSTEM_DYNAMIC_TEST<wbr>_ROOT=/w/bld/org/projects/libc<wbr>xx/test/filesystem/Output/dyna<wbr>mic_env -D LIBCXX_FILESYSTEM_DYNAMIC_TEST<wbr>_HELPER=/usr/local/bin/python2<wbr>.7 /w/src/<a href="http://llvm.org/projects/libcxx/test/support/filesystem_dynamic_test_helper.py" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/support/filesystem_dyna<wbr>mic_test_helper.py</a> -Werror=thread-safety -std=c++1z -fdeprecated-macro -fdebug-compilation-dir /w/src/<a href="http://llvm.org" rel="noreferrer" target="_blank">llvm.org</a> -ferror-limit 19 -fmessage-length 210 -fobjc-runtime=gnustep -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o /w/bld/org/projects/libcxx/tes<wbr>t/std/utilities/utility/pairs/<wbr>pairs.pair/Output/trivial_copy<wbr>_move.pass.cpp.o -x c++ /w/src/<a href="http://llvm.org/projects/libcxx/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/utilities/utility/p<wbr>airs/pairs.pair/trivial_copy_m<wbr>ove.pass.cpp</a><br>
clang -cc1 version 3.8.0 based upon LLVM 3.8.0 default target x86_64-unknown-freebsd11.0<span><br>
#include "..." search starts here:<br>
#include <...> search starts here:<br>
/w/src/<a href="http://llvm.org/projects/libcxx/include" rel="noreferrer" target="_blank">llvm.org/projects/libc<wbr>xx/include</a><br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/support" rel="noreferrer" target="_blank">llvm.org/projects/libc<wbr>xx/test/support</a><br></span>
/usr/bin/../lib/clang/3.8.0/i<wbr>nclude<span><br>
/usr/include<br>
End of search list.<br></span>
/w/src/<a href="http://llvm.org/projects/libcxx/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp:35:9" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/utilities/utility/p<wbr>airs/pairs.pair/trivial_copy_m<wbr>ove.pass.cpp:35:9</a>: error: static_assert failed ""<br>
static_assert(std::is_triviall<wbr>y_copy_constructible<P>::value<wbr>, "");<br>
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<wbr>~~~~~~~~~~~~~~~~~<br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp:40:9" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/utilities/utility/p<wbr>airs/pairs.pair/trivial_copy_m<wbr>ove.pass.cpp:40:9</a>: error: static_assert failed ""<br>
static_assert(std::is_triviall<wbr>y_move_constructible<P>::value<wbr>, "");<br>
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<wbr>~~~~~~~~~~~~~~~~~<br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp:47:9" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/utilities/utility/p<wbr>airs/pairs.pair/trivial_copy_m<wbr>ove.pass.cpp:47:9</a>: error: static_assert failed ""<br>
static_assert(std::is_triviall<wbr>y_move_constructible<P1>::valu<wbr>e, "");<br>
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<wbr>~~~~~~~~~~~~~~~~~~<br>
3 errors generated.<br>
<br>
<br>
<br>
-Krzysztof<span><br>
<br>
<br>
<br>
<br>
On 10/7/2016 9:31 PM, Eric Fiselier wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
In my infinite cleverness I think I found a solution which gives both<br>
constexpr and non-trivial constructors.<br>
<br>
Please take a look at <a href="https://reviews.llvm.org/D25389" rel="noreferrer" target="_blank">https://reviews.llvm.org/D2538<wbr>9</a>.<br>
<br>
/Eric<br>
<br>
On Fri, Oct 7, 2016 at 8:11 PM, Eric Fiselier <<a href="mailto:eric@efcs.ca" target="_blank">eric@efcs.ca</a><br></span><span>
<mailto:<a href="mailto:eric@efcs.ca" target="_blank">eric@efcs.ca</a>>> wrote:<br>
<br>
On second thought applying (A) might be ill-advised. Most of the<br>
pair tests still fail after applying it in constructs like<br>
"std::is_copy_constructible_v<<wbr>std::pair<NonCopyable, int&&>>",<br>
except now instead of returning the wrong answer the traits cause<br>
hard compile errors and template barf.<br>
<br>
@Ed, David, and Dimitry The FreeBSD std::pair implementation is<br>
fundamentally broken, and there's not much I think I can do about<br>
it. Is there a timeline for making the ABI change in FreeBSD?<br>
<br>
/Eric<br>
<br>
On Fri, Oct 7, 2016 at 7:59 PM, Eric Fiselier <<a href="mailto:eric@efcs.ca" target="_blank">eric@efcs.ca</a><br></span><span>
<mailto:<a href="mailto:eric@efcs.ca" target="_blank">eric@efcs.ca</a>>> wrote:<br>
<br>
> Does anyone know what the problem may be?<br>
<br>
FreeBSD ships std::pair with explicitly defined copy and move<br>
constructors as opposed to explicitly defaulted ones. Mistakenly<br>
these constructors have not been marked constexpr in C++14.<br>
FreeBSD provides these old constructors is because switching to<br>
defaulted copy/move constructors is an ABI break because it<br>
makes std::pair non-trivial and changes how it's passed to<br>
functions according to the Itanium ABI.<br>
<br>
Fixing this requires either (A) marking the fallback<br>
constructors constexpr in C++14, or (B) convincing FreeBSD to<br>
take the ABI break.<br>
<br>
The easiest and simplistic fix is (A). However my concern with<br>
(A) is that the fallback constructors don't SFINAE away if they<br>
are ill-formed. This means that applying constexpr to them could<br>
break existing code by causing the eager instantiation of the<br>
ill-formed constructors, instantiations that would not occur if<br>
the constructors were non-constexpr. For this reason I think fix<br>
(B) is more correct, and greatly preferable.<br>
<br>
Since we have plenty of time until the next release I'll go<br>
ahead and commit (A) for now, keeping my ear to the ground for<br>
breakage.<br>
<br>
/Eric<br>
<br>
<br>
On Fri, Oct 7, 2016 at 7:23 PM, Krzysztof Parzyszek via cfe-dev<br></span><span>
<<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a> <mailto:<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><wbr>>> wrote:<br>
<br>
I'm running this on FreeBSD 11 (stable). It has clang-3.8.0<br>
as the system compiler. LLVM/Clang/et al. compiled without<br>
problems, but I'm seeing failures in check-libcxx. Example<br>
below.<br>
<br>
Does anyone know what the problem may be?<br>
<br>
<br>
clang version 4.0.0 (<a href="http://llvm.org/git/clang.git" rel="noreferrer" target="_blank">http://llvm.org/git/clang.git</a><br>
a85c03256cfc0812e268f5e0f1b804<wbr>910e75e673)<br>
(<a href="http://llvm.org/git/llvm.git" rel="noreferrer" target="_blank">http://llvm.org/git/llvm.git</a><br>
c95d4ff692323bde64fc8ef45e174b<wbr>19450779af)<br>
Target: x86_64-unknown-freebsd11.0<br>
Thread model: posix<br>
InstalledDir: /w/c/org/bin<br>
"/w/c/org/bin/clang-4.0" -cc1 -triple<br>
x86_64-unknown-freebsd11.0 -emit-obj -mrelax-all<br>
-disable-free -main-file-name minmax_init_list_comp.pass.cpp<br>
-mrelocation-model static -mthread-model posix<br>
-mdisable-fp-elim -masm-verbose -mconstructor-aliases<br>
-munwind-tables -target-cpu x86-64 -v -v -dwarf-column-info<br>
-debugger-tuning=gdb -coverage-notes-file<br>
/w/bld/org/projects/libcxx/tes<wbr>t/std/algorithms/alg.sorting/a<wbr>lg.min.max/Output/minmax_init_<wbr>list_comp.pass.cpp.gcno<br>
-nostdinc++ -resource-dir /w/c/org/bin/../lib/clang/4.0.<wbr>0<br>
-include<br></span>
/w/src/<a href="http://llvm.org/projects/libcxx/test/support/nasty_macros.hpp" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/support/nasty_macros.hp<wbr>p</a> <<a href="http://llvm.org/projects/libcxx/test/support/nasty_macros.hpp" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/support/nasty_macros.h<wbr>pp</a>><br>
-I /w/src/<a href="http://llvm.org/projects/libcxx/include" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/include</a><br>
<<a href="http://llvm.org/projects/libcxx/include" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/include</a>> -I<br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/support" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/support</a><br>
<<a href="http://llvm.org/projects/libcxx/test/support" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/support</a>> -D<br>
LIBCXX_FILESYSTEM_STATIC_TEST_<wbr>ROOT=/w/src/<a href="http://llvm.org/projects/libcxx/test/std/experimental/filesystem/Inputs/static_test_env" rel="noreferrer" target="_blank">llvm.org/projects/<wbr>libcxx/test/std/experimental/f<wbr>ilesystem/Inputs/static_test_e<wbr>nv</a><br>
<<a href="http://llvm.org/projects/libcxx/test/std/experimental/filesystem/Inputs/static_test_env" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/std/experimental/files<wbr>ystem/Inputs/static_test_env</a>><span><br>
-D<br>
LIBCXX_FILESYSTEM_DYNAMIC_TEST<wbr>_ROOT=/w/bld/org/projects/libc<wbr>xx/test/filesystem/Output/dyna<wbr>mic_env<br>
-D<br>
LIBCXX_FILESYSTEM_DYNAMIC_TEST<wbr>_HELPER=/usr/local/bin/python2<wbr>.7<br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/support/filesystem_dynamic_test_helper.py" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/support/filesystem_dyna<wbr>mic_test_helper.py</a><br></span>
<<a href="http://llvm.org/projects/libcxx/test/support/filesystem_dynamic_test_helper.py" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/support/filesystem_dyn<wbr>amic_test_helper.py</a>><br>
-Werror=thread-safety -std=c++1z -fdeprecated-macro<br>
-fdebug-compilation-dir /w/src/<a href="http://llvm.org" rel="noreferrer" target="_blank">llvm.org</a> <<a href="http://llvm.org" rel="noreferrer" target="_blank">http://llvm.org</a>><span><br>
-ferror-limit 19 -fmessage-length 210 -fobjc-runtime=gnustep<br>
-fcxx-exceptions -fexceptions -fdiagnostics-show-option<br>
-fcolor-diagnostics -o<br>
/w/bld/org/projects/libcxx/tes<wbr>t/std/algorithms/alg.sorting/a<wbr>lg.min.max/Output/minmax_init_<wbr>list_comp.pass.cpp.o<br>
-x c++<br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/algorithms/alg.sort<wbr>ing/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp</a><br></span>
<<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/std/algorithms/alg.sor<wbr>ting/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp</a>><span><br>
clang -cc1 version 4.0.0 based upon LLVM 4.0.0svn default<br>
target x86_64-unknown-freebsd11.0<br>
#include "..." search starts here:<br>
#include <...> search starts here:<br>
/w/src/<a href="http://llvm.org/projects/libcxx/include" rel="noreferrer" target="_blank">llvm.org/projects/libc<wbr>xx/include</a><br></span>
<<a href="http://llvm.org/projects/libcxx/include" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/include</a>><br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/support" rel="noreferrer" target="_blank">llvm.org/projects/libc<wbr>xx/test/support</a><br>
<<a href="http://llvm.org/projects/libcxx/test/support" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/support</a>><span><br>
/w/c/org/bin/../lib/clang/4.0<wbr>.0/include<br>
/usr/include<br>
End of search list.<br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:68:19" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/algorithms/alg.sort<wbr>ing/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:68:19</a><br></span>
<<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:68:19" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/std/algorithms/alg.sor<wbr>ting/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:68:19</a>>:<span><br>
error: static_assert expression is not an integral constant<br>
expression<br>
static_assert((std::minmax({1, 2, 3},<br>
std::greater<int>()) == std::pair<int, int>(3, 1)), "");<br>
<br>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<wbr>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<wbr>~~~~~~~~~~~~~~<br>
/w/src/<a href="http://llvm.org/projects/libcxx/include/algorithm:2823:12" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/include/algorithm:2823:12</a><br></span>
<<a href="http://llvm.org/projects/libcxx/include/algorithm:2823:12" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/include/algorithm:2823:12</a>>:<span><br>
note: non-constexpr constructor 'pair' cannot be used in a<br>
constant expression<br>
return __result;<br>
^<br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:68:20" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/algorithms/alg.sort<wbr>ing/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:68:20</a><br></span>
<<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:68:20" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/std/algorithms/alg.sor<wbr>ting/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:68:20</a>>:<span><br>
note: in call to 'minmax({&{1, 2, 3}[0], 3}, {{}})'<br>
static_assert((std::minmax({1, 2, 3},<br>
std::greater<int>()) == std::pair<int, int>(3, 1)), "");<br>
^<br>
/w/src/<a href="http://llvm.org/projects/libcxx/include/utility:316:5" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/include/utility:316:5</a><br></span>
<<a href="http://llvm.org/projects/libcxx/include/utility:316:5" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/include/utility:316:5</a>>:<span><br>
note: declared here<br>
pair(pair&& __p)<br>
_NOEXCEPT_(is_nothrow_move_con<wbr>structible<first_type>::value &&<br>
^<br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:69:19" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/algorithms/alg.sort<wbr>ing/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:69:19</a><br></span>
<<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:69:19" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/std/algorithms/alg.sor<wbr>ting/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:69:19</a>>:<span><br>
error: static_assert expression is not an integral constant<br>
expression<br>
static_assert((std::minmax({1, 3, 2},<br>
std::greater<int>()) == std::pair<int, int>(3, 1)), "");<br>
<br>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<wbr>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<wbr>~~~~~~~~~~~~~~<br>
/w/src/<a href="http://llvm.org/projects/libcxx/include/algorithm:2823:12" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/include/algorithm:2823:12</a><br></span>
<<a href="http://llvm.org/projects/libcxx/include/algorithm:2823:12" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/include/algorithm:2823:12</a>>:<span><br>
note: non-constexpr constructor 'pair' cannot be used in a<br>
constant expression<br>
return __result;<br>
^<br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:69:20" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/algorithms/alg.sort<wbr>ing/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:69:20</a><br></span>
<<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:69:20" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/std/algorithms/alg.sor<wbr>ting/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:69:20</a>>:<span><br>
note: in call to 'minmax({&{1, 3, 2}[0], 3}, {{}})'<br>
static_assert((std::minmax({1, 3, 2},<br>
std::greater<int>()) == std::pair<int, int>(3, 1)), "");<br>
^<br>
/w/src/<a href="http://llvm.org/projects/libcxx/include/utility:316:5" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/include/utility:316:5</a><br></span>
<<a href="http://llvm.org/projects/libcxx/include/utility:316:5" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/include/utility:316:5</a>>:<span><br>
note: declared here<br>
pair(pair&& __p)<br>
_NOEXCEPT_(is_nothrow_move_con<wbr>structible<first_type>::value &&<br>
^<br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:70:19" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/algorithms/alg.sort<wbr>ing/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:70:19</a><br></span>
<<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:70:19" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/std/algorithms/alg.sor<wbr>ting/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:70:19</a>>:<span><br>
error: static_assert expression is not an integral constant<br>
expression<br>
static_assert((std::minmax({2, 1, 3},<br>
std::greater<int>()) == std::pair<int, int>(3, 1)), "");<br>
<br>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<wbr>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<wbr>~~~~~~~~~~~~~~<br>
/w/src/<a href="http://llvm.org/projects/libcxx/include/algorithm:2823:12" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/include/algorithm:2823:12</a><br></span>
<<a href="http://llvm.org/projects/libcxx/include/algorithm:2823:12" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/include/algorithm:2823:12</a>>:<span><br>
note: non-constexpr constructor 'pair' cannot be used in a<br>
constant expression<br>
return __result;<br>
^<br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:70:20" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/algorithms/alg.sort<wbr>ing/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:70:20</a><br></span>
<<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:70:20" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/std/algorithms/alg.sor<wbr>ting/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:70:20</a>>:<span><br>
note: in call to 'minmax({&{2, 1, 3}[0], 3}, {{}})'<br>
static_assert((std::minmax({2, 1, 3},<br>
std::greater<int>()) == std::pair<int, int>(3, 1)), "");<br>
^<br>
/w/src/<a href="http://llvm.org/projects/libcxx/include/utility:316:5" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/include/utility:316:5</a><br></span>
<<a href="http://llvm.org/projects/libcxx/include/utility:316:5" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/include/utility:316:5</a>>:<span><br>
note: declared here<br>
pair(pair&& __p)<br>
_NOEXCEPT_(is_nothrow_move_con<wbr>structible<first_type>::value &&<br>
^<br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:71:19" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/algorithms/alg.sort<wbr>ing/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:71:19</a><br></span>
<<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:71:19" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/std/algorithms/alg.sor<wbr>ting/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:71:19</a>>:<span><br>
error: static_assert expression is not an integral constant<br>
expression<br>
static_assert((std::minmax({2, 3, 1},<br>
std::greater<int>()) == std::pair<int, int>(3, 1)), "");<br>
<br>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<wbr>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<wbr>~~~~~~~~~~~~~~<br>
/w/src/<a href="http://llvm.org/projects/libcxx/include/algorithm:2823:12" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/include/algorithm:2823:12</a><br></span>
<<a href="http://llvm.org/projects/libcxx/include/algorithm:2823:12" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/include/algorithm:2823:12</a>>:<span><br>
note: non-constexpr constructor 'pair' cannot be used in a<br>
constant expression<br>
return __result;<br>
^<br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:71:20" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/algorithms/alg.sort<wbr>ing/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:71:20</a><br></span>
<<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:71:20" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/std/algorithms/alg.sor<wbr>ting/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:71:20</a>>:<span><br>
note: in call to 'minmax({&{2, 3, 1}[0], 3}, {{}})'<br>
static_assert((std::minmax({2, 3, 1},<br>
std::greater<int>()) == std::pair<int, int>(3, 1)), "");<br>
^<br>
/w/src/<a href="http://llvm.org/projects/libcxx/include/utility:316:5" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/include/utility:316:5</a><br></span>
<<a href="http://llvm.org/projects/libcxx/include/utility:316:5" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/include/utility:316:5</a>>:<span><br>
note: declared here<br>
pair(pair&& __p)<br>
_NOEXCEPT_(is_nothrow_move_con<wbr>structible<first_type>::value &&<br>
^<br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:72:19" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/algorithms/alg.sort<wbr>ing/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:72:19</a><br></span>
<<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:72:19" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/std/algorithms/alg.sor<wbr>ting/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:72:19</a>>:<span><br>
error: static_assert expression is not an integral constant<br>
expression<br>
static_assert((std::minmax({3, 1, 2},<br>
std::greater<int>()) == std::pair<int, int>(3, 1)), "");<br>
<br>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<wbr>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<wbr>~~~~~~~~~~~~~~<br>
/w/src/<a href="http://llvm.org/projects/libcxx/include/algorithm:2823:12" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/include/algorithm:2823:12</a><br></span>
<<a href="http://llvm.org/projects/libcxx/include/algorithm:2823:12" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/include/algorithm:2823:12</a>>:<span><br>
note: non-constexpr constructor 'pair' cannot be used in a<br>
constant expression<br>
return __result;<br>
^<br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:72:20" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/algorithms/alg.sort<wbr>ing/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:72:20</a><br></span>
<<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:72:20" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/std/algorithms/alg.sor<wbr>ting/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:72:20</a>>:<span><br>
note: in call to 'minmax({&{3, 1, 2}[0], 3}, {{}})'<br>
static_assert((std::minmax({3, 1, 2},<br>
std::greater<int>()) == std::pair<int, int>(3, 1)), "");<br>
^<br>
/w/src/<a href="http://llvm.org/projects/libcxx/include/utility:316:5" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/include/utility:316:5</a><br></span>
<<a href="http://llvm.org/projects/libcxx/include/utility:316:5" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/include/utility:316:5</a>>:<span><br>
note: declared here<br>
pair(pair&& __p)<br>
_NOEXCEPT_(is_nothrow_move_con<wbr>structible<first_type>::value &&<br>
^<br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:73:19" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/algorithms/alg.sort<wbr>ing/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:73:19</a><br></span>
<<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:73:19" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/std/algorithms/alg.sor<wbr>ting/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:73:19</a>>:<span><br>
error: static_assert expression is not an integral constant<br>
expression<br>
static_assert((std::minmax({3, 2, 1},<br>
std::greater<int>()) == std::pair<int, int>(3, 1)), "");<br>
<br>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<wbr>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<wbr>~~~~~~~~~~~~~~<br>
/w/src/<a href="http://llvm.org/projects/libcxx/include/algorithm:2823:12" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/include/algorithm:2823:12</a><br></span>
<<a href="http://llvm.org/projects/libcxx/include/algorithm:2823:12" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/include/algorithm:2823:12</a>>:<span><br>
note: non-constexpr constructor 'pair' cannot be used in a<br>
constant expression<br>
return __result;<br>
^<br>
/w/src/<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:73:20" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/test/std/algorithms/alg.sort<wbr>ing/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:73:20</a><br></span>
<<a href="http://llvm.org/projects/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp:73:20" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/test/std/algorithms/alg.sor<wbr>ting/alg.min.max/minmax_init_<wbr>list_comp.pass.cpp:73:20</a>>:<span><br>
note: in call to 'minmax({&{3, 2, 1}[0], 3}, {{}})'<br>
static_assert((std::minmax({3, 2, 1},<br>
std::greater<int>()) == std::pair<int, int>(3, 1)), "");<br>
^<br>
/w/src/<a href="http://llvm.org/projects/libcxx/include/utility:316:5" rel="noreferrer" target="_blank">llvm.org/projects/libcx<wbr>x/include/utility:316:5</a><br></span>
<<a href="http://llvm.org/projects/libcxx/include/utility:316:5" rel="noreferrer" target="_blank">http://llvm.org/projects/libc<wbr>xx/include/utility:316:5</a>>:<span><br>
note: declared here<br>
pair(pair&& __p)<br>
_NOEXCEPT_(is_nothrow_move_con<wbr>structible<first_type>::value &&<br>
^<br>
6 errors generated.<br>
<br>
<br>
-Krzysztof<br>
<br>
______________________________<wbr>_________________<br>
cfe-dev mailing list<br></span>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a> <mailto:<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><wbr>><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin<wbr>/mailman/listinfo/cfe-dev</a>><br>
<br>
<br>
<br>
<br>
</blockquote>
<br>
</blockquote></div><br></div></div>