[cfe-dev] libc++ and const expr.
Jean-Daniel Dupas
devlists at shadowlab.org
Sat Feb 4 02:25:07 PST 2012
Hi,
Am I the only one having trouble compiling libc++ with clang TOT.
For sometime now, clang refuse to compile (and use it) because of the following issue:
../include/ratio:193:19: error: static_assert expression is not an integral constant expression
static_assert(_Xp != nan && _Yp != nan && __a_x <= max / __a_y, "overflow in __ll_mul");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/ratio:308:13: note: in instantiation of template class 'std::__1::__ll_mul<1, 1>' requested here
__ll_mul<_R1::num / __gcd_n1_n2, _R2::den / __gcd_d1_d2>::value,
^
../include/ratio:315:33: note: in instantiation of template class 'std::__1::__ratio_divide<std::__1::ratio<1, 1000000000>, std::__1::ratio<1, 1000000000> >' requested
here
template <class _R1, class _R2> using ratio_divide
^
../include/chrono:410:18: note: in instantiation of template type alias 'ratio_divide' requested here
(ratio_divide<_Period2, period>::type::den == 1 &&
^
../include/chrono:406:9: note: while substituting deduced template arguments into function template 'duration' [with _Rep2 = long long, _Period2 = <no value>]
duration(const duration<_Rep2, _Period2>& __d,
^
../include/ratio:193:26: note: initializer of 'nan' is not a constant expression
static_assert(_Xp != nan && _Yp != nan && __a_x <= max / __a_y, "overflow in __ll_mul");
^
../include/ratio:187:27: note: declared here
static const intmax_t nan = (1LL << (sizeof(intmax_t) * CHAR_BIT - 1));
^
../include/ratio:187:27: note: declared here
../include/ratio:189:27: note: declared here
static const intmax_t max = -min;
-- Jean-Daniel
_______________________________________________
cfe-commits mailing list
cfe-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120204/4d826e5d/attachment.html>
More information about the cfe-dev
mailing list