https://bugs.llvm.org/show_bug.cgi?id=32144
Bug ID: 32144
Summary: [modules/c++14] constexpr function does not return a
constexpr value
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Modules
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
When enabling modules in the following situation
template <typename T>
static constexpr const auto var = std::numeric_limits<T>::max();
template <typename T, T val = var<T>>
using foo = std::integral_constant<T, val>;
foo<int> val;
I get an "error: non-type template argument is not a constant expression",
pointing that the "initializer of 'var<int>' is not a constant expression".
When disabling modules, everything compiles just fine.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs