1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // const_pointer data() const;
17 #include "min_allocator.h"
18 #include "asan_testing.h"
23 const std::vector<int> v;
24 assert(v.data() == 0);
25 assert(is_contiguous_container_asan_correct(v));
28 const std::vector<int> v(100);
29 assert(v.data() == &v.front());
30 assert(is_contiguous_container_asan_correct(v));
32 #if __cplusplus >= 201103L
34 const std::vector<int, min_allocator<int>> v;
35 assert(v.data() == 0);
36 assert(is_contiguous_container_asan_correct(v));
39 const std::vector<int, min_allocator<int>> v(100);
40 assert(v.data() == &v.front());
41 assert(is_contiguous_container_asan_correct(v));