2
0
mirror of https://github.com/boostorg/align.git synced 2026-01-28 06:42:08 +00:00
Files
align/example/aligned_vector.cpp
2014-06-11 07:05:18 -07:00

27 lines
508 B
C++

/*
Copyright (c) 2014 Glen Joseph Fernandes
glenfe at live dot com
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt
or copy at http://boost.org/LICENSE_1_0.txt)
*/
#include "aligned_vector.hpp"
//[aligned_vector_cpp
/*`
Here `aligned_vector` is used to create
a `vector` of integers where each integer
object has extended cache alignment.
*/
enum {
cache_line = 64
};
int main()
{
aligned_vector<int, cache_line> v(32);
v[0] = 1;
}
//]