Quick Start
- Install Buckaroo and Buck
- Run
$ buckaroo quickstart
- Run the generated app:
$ buck run :app
Parsing buck files: finished in 0.7 sec (100%)
Building: finished in 1.0 sec (100%) 6/6 jobs, 6 updated
Total time: 1.9 sec
Hello, world.
- Add a dependency:
$ buckaroo add github.com/buckaroo-pm/ericniebler-range-v3@branch=master
- Now you can use range-v3. Update
main.cpp
to:
#include <iostream>
#include <vector>
#include <range/v3/all.hpp>
int main() {
auto const xs = std::vector<int>({ 1, 2, 3, 4, 5 });
auto const ys = xs
| ranges::view::transform([](auto x) { return x * x; })
| ranges::to_vector;
for (auto const& i : ys) {
std::cout << i << std::endl;
}
return 0;
}
🚨 WARNING
If your C++ compiler does not default to C++ 14, then you will need to add this to your .buckconfig
file:
[cxx]
cxxflags = -std=c++14