2010-05-11 19:42:16 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2010-05-11 21:36:01 +00:00
|
|
|
// The LLVM Compiler Infrastructure
|
2010-05-11 19:42:16 +00:00
|
|
|
//
|
2010-11-16 22:09:02 +00:00
|
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
|
|
// Source Licenses. See LICENSE.TXT for details.
|
2010-05-11 19:42:16 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// <vector>
|
|
|
|
|
|
|
|
// vector(initializer_list<value_type> il);
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <cassert>
|
|
|
|
|
2013-06-27 19:35:32 +00:00
|
|
|
#include "../../min_allocator.h"
|
|
|
|
|
2010-05-11 19:42:16 +00:00
|
|
|
int main()
|
|
|
|
{
|
2011-08-12 21:56:02 +00:00
|
|
|
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
2013-06-27 19:35:32 +00:00
|
|
|
{
|
|
|
|
std::vector<bool> d = {true, false, false, true};
|
|
|
|
assert(d.size() == 4);
|
|
|
|
assert(d[0] == true);
|
|
|
|
assert(d[1] == false);
|
|
|
|
assert(d[2] == false);
|
|
|
|
assert(d[3] == true);
|
|
|
|
}
|
|
|
|
#if __cplusplus >= 201103L
|
|
|
|
{
|
|
|
|
std::vector<bool, min_allocator<bool>> d = {true, false, false, true};
|
2010-05-11 19:42:16 +00:00
|
|
|
assert(d.size() == 4);
|
|
|
|
assert(d[0] == true);
|
|
|
|
assert(d[1] == false);
|
|
|
|
assert(d[2] == false);
|
|
|
|
assert(d[3] == true);
|
2013-06-27 19:35:32 +00:00
|
|
|
}
|
|
|
|
#endif
|
2011-08-12 21:56:02 +00:00
|
|
|
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
2010-05-11 19:42:16 +00:00
|
|
|
}
|