[cfe-dev] constexpr with builtin
fil
fil at pobox.com
Mon Sep 9 06:11:35 PDT 2013
CLANG 3.2, just wondering if anyone can explain:
inline constexpr uint8_t test(uint64_t value)
{
return value == 0 ? 0: __builtin_clzll(value);
}
Result: /Constexpr function never produces a constant expression/
While this compiles fine:
inline constexpr uint8_t test(uint64_t value)
{
return value == value ? __builtin_clzll(value) : 0;
}
Any ideas?
--
View this message in context: http://clang-developers.42468.n3.nabble.com/constexpr-with-builtin-tp4034336.html
Sent from the Clang Developers mailing list archive at Nabble.com.
More information about the cfe-dev
mailing list