Rodhos Soft

備忘録を兼ねた技術的なメモです。Rofhos SoftではiOSアプリ開発を中心としてAndroid, Webサービス等の開発を承っております。まずはご相談下さい。

2018-06-05から1日間の記事一覧

チュートリアル2

さらに簡単な例 #include <rxcpp/rx.hpp> rxcpp::observable<std::string> twice(std::string word) { return rxcpp::observable<>::just(word + word); } rxcpp::observable<int> length(std::string word) { int l = (int)word.length(); return rxcpp::observable<>::just(l); } rxcpp::ob</int></std::string></rxcpp/rx.hpp>…

チュートリアル

一番簡単な使い方 rxcpp::observable<int> obs = rxcpp::observable<>::create<int> ( [=](rxcpp::subscriber<int> s) { s.on_next(100); s.on_next(200); s.on_next(300); s.on_completed(); } ); auto x = obs.flat_map([=](int x) { return rxcpp::observable<>::just(x </int></int></int>…

ライブラリ

Boost Libraries

variant 共用体

かなり便利なことがわかった。 #include <boost/variant.hpp> #include <iostream> int main(int argc, const char * argv[]) { // insert code here... std::cout << "Hello, World!\n"; boost::variant<int, std::string> v; v = 100; boost::variant<int, std::string> s; s = "200"; if (v.type() == typeid(int)) { int l =</int,></int,></iostream></boost/variant.hpp>…

boost設定

Macの場合。brewでinstall /usr/local/Cellar/boost/1.67.0_1 ここにincludeヘッダーとlibがあるのでXCodeのパスを通す。 Header Search Pathsにinclude Library Search Pathsにlib non-recursiveOther linker flagに -lboost_system設定