Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ FIND_PACKAGE(Boost COMPONENTS program_options REQUIRED)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})

add_executable(hello main.cpp)
add_executable(container objectContainer.cpp)
add_executable(boost boostArray.cpp)

23 changes: 23 additions & 0 deletions boostArray.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <boost/array.hpp>
#include <algorithm>

typedef boost::array<char, 4> array4_t;

array4_t &vector_advance(array4_t &val) {
const auto inc = [](char& c) {c++;};

std::for_each(val.begin(), val.end(), inc);
return val;
}

int main() {
array4_t val = {0, 1, 2, 3};

array4_t val_res;
val_res = vector_advance(val);

assert(val.size() == 4);
assert(val[0] == 1);

assert(sizeof(val) == sizeof(char) * array4_t::static_size);
}
9 changes: 9 additions & 0 deletions gtestCheck.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <iostream>
#include <gtest/gtest.h>
using namespace std;

int main(int argc, char* argv[])
{
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
15 changes: 0 additions & 15 deletions objectContainer.cpp

This file was deleted.