f5256e16df
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103516 91177308-0d34-0410-b5e6-96231b3b80d8
28 lines
608 B
C++
28 lines
608 B
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// <vector>
|
|
|
|
// const_pointer data() const;
|
|
|
|
#include <vector>
|
|
#include <cassert>
|
|
|
|
int main()
|
|
{
|
|
{
|
|
const std::vector<int> v;
|
|
assert(v.data() == 0);
|
|
}
|
|
{
|
|
const std::vector<int> v(100);
|
|
assert(v.data() == &v.front());
|
|
}
|
|
}
|