Zhang Xiongpang: Add definitions for const data members. Fixes http://llvm.org/bugs/show_bug.cgi?id=14585.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170026 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -26,6 +26,9 @@
|
||||
#include <type_traits>
|
||||
#include <cassert>
|
||||
|
||||
template <class _Tp>
|
||||
void where(const _Tp &) {}
|
||||
|
||||
void
|
||||
test1()
|
||||
{
|
||||
@@ -34,6 +37,8 @@ test1()
|
||||
static_assert((E::used_block == 23), "");
|
||||
/*static_*/assert((E::min() == 0)/*, ""*/);
|
||||
/*static_*/assert((E::max() == 0xFFFFFF)/*, ""*/);
|
||||
where(E::block_size);
|
||||
where(E::used_block);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -44,6 +49,8 @@ test2()
|
||||
static_assert((E::used_block == 11), "");
|
||||
/*static_*/assert((E::min() == 0)/*, ""*/);
|
||||
/*static_*/assert((E::max() == 0xFFFFFFFFFFFFull)/*, ""*/);
|
||||
where(E::block_size);
|
||||
where(E::used_block);
|
||||
}
|
||||
|
||||
int main()
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
#include <type_traits>
|
||||
#include <cassert>
|
||||
|
||||
template <class _Tp>
|
||||
void where(const _Tp &) {}
|
||||
|
||||
void
|
||||
test1()
|
||||
{
|
||||
@@ -32,6 +35,7 @@ test1()
|
||||
static_assert(E::table_size == 256, "");
|
||||
/*static_*/assert((E::min() == 1)/*, ""*/);
|
||||
/*static_*/assert((E::max() == 2147483646)/*, ""*/);
|
||||
where(E::table_size);
|
||||
}
|
||||
|
||||
int main()
|
||||
|
||||
Reference in New Issue
Block a user