gulrak /
filesystem
An implementation of C++17 std::filesystem for C++11 /C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD.
88/100 healthLoading repository data…
guangie88 / repository
C++ implementation of Rust Option/Result and Iterator.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
rustfpC++14 implementation of Rust Option/Result (monads) and Iterator concepts, useful for expressing items and result manipulation in a more functional style.
Currently tested to be compiling on g++-5 and above, MSVC2015 and above.
clang should work as well, as long as the version supports C++14.
For Git version 1.6.5 or later:
git clone --recursive https://github.com/guangie88/rustfp.git
For already cloned repository or older Git version:
git clone https://github.com/guangie88/rustfp.git
git submodule update --init --recursive
The solution uses CMake (at least version 3.6) for compilation and installation.
To enable unit tests to be compiled for rustfp, add
-DRUSTFP_INCLUDE_UNIT_TESTS=ON during the CMake configuration step.
MSVC
32-bit
MSVC2015: Visual Studio 14MSVC2017: Visual Studio 1564-bit
MSVC2015: Visual Studio 14 Win64MSVC2017: Visual Studio 15 Win64mkdir build
cd build
cmake .. -G "Visual Studio 14 Win64" -DCMAKE_INSTALL_PREFIX:PATH=install
cmake --build . --config debug
cmake --build . --config release --target install
For Linux, simply run
export CC=<path-to-desired-CC-compiler>; export CXX=<path-to-desired-CXX-compiler>
before running the CMake commands. As such, there should be no need to set
-G <generator-name>.
export CC=/usr/bin/gcc-5; export CXX=/usr/bin/g++-5
Note that gcc requires the build type to be specified at the CMake
configuration step.
mkdir build-debug
cd build-debug
cmake .. -DCMAKE_BUILD_TYPE=Debug
cmake --build .
mkdir build-release
cd build-release
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=install
cmake --build . --target install
For the header files that are required to be included in other solutions, simply
extract out the following directories in build/install/include into your other
desired include directory:
nonstdmparkrustfp#include "rustfp/collect.h"
#include "rustfp/iter.h"
#include "rustfp/map.h"
#include <cassert>
#include <string>
#include <vector>
int main() {
const std::vector<int> v_int{0, 1, 2};
// rustfp::iter works differently from C++ iterator.
// containers with proper begin/cbegin and end/cend
// has to be wrapped by rustfp::iter before any of
// the FP operations (e.g. map, filter, fold) can be
// used.
const auto v_str = rustfp::iter(v_int)
| rustfp::map([](const auto &v) {
// v is of const int & type
return std::to_string(v);
})
| rustfp::collect<std::vector<std::string>>();
assert(v_str[0] == "0");
assert(v_str[1] == "1");
assert(v_str[2] == "2");
}
Selected from shared topics, language and repository description—not editorial ratings.
gulrak /
An implementation of C++17 std::filesystem for C++11 /C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD.
88/100 healthProAlgos /
C++ implementations of well-known (and some rare) algorithms, while following good software development practices
84/100 healthawslabs /
C++ implementation of the AWS Lambda runtime
button-chen /
The modern c++ rpc library implemented in a few hundred lines of code
67/100 healthOpenCyphal-Garage /
Portable reference implementation of the Cyphal protocol stack in C++ for embedded systems and Linux.
78/100 healthVestniK /
Portable implementation of future/promise API in C++
56/100 health