Add additional tests to ensure that we DTRT with short lists. This is LWG#2590, but there are no code changes, just additional tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@261648 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -35,4 +35,18 @@ int main()
|
|||||||
C c = {};
|
C c = {};
|
||||||
assert(c.size() == 0);
|
assert(c.size() == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
typedef double T;
|
||||||
|
typedef std::array<T, 3> C;
|
||||||
|
C c = {1};
|
||||||
|
assert(c.size() == 3.0);
|
||||||
|
assert(c[0] == 1);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
typedef int T;
|
||||||
|
typedef std::array<T, 1> C;
|
||||||
|
C c = {};
|
||||||
|
assert(c.size() == 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user