自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 C++ lambda表达式举例与结果

#include <iostream>using namespace std;class Base{public:Base(int x_i,int y_i):x{x_i},y{y_i}{};int Call(){cout << "x := "<< x << '\n';cout << "y := "<< y << '\n';cout << "z := "<< z <<

2020-07-20 10:54:40 1405

原创 C++17 lambda 表达式销毁问题

#include <iostream>using namespace std;class C {private:std::string name;public:void foo() const {auto l1 = [this] { std::cout <<this->name << '\n'; this->print();}; l1();}void print()const{cout << "nice to meet

2020-07-20 09:43:39 615

原创 学习boost::combine 之路

学习boost::combine 之路#include <iostream>#include <boost/range/combine.hpp>#include <boost/optional.hpp>#include <set>using namespace std;int main() { std::set<int> a{1,2}; std::set<int> b{1,3}; auto c=boost::comb

2020-07-09 10:00:55 327 1

原创 C++编译遇到问题记录

#include <optional>#include <iostream>#include <string>using namespace std;int main(){cout<<"hello"<<endl;return 0;}编译使用:gcc -std=c++17 -g optional_changeValue.cpp -o out错误提示:/opt/binutils/x86_64/2.32/bin/ld: opt

2020-06-24 09:37:50 326

原创 template 初探

定义一个基类模板class#include <iostream>using namespace std;template <typename Handler, typename... Names>class Base;int main() { cout<<"hello"<<endl; return 0;}result:hello2.

2020-06-08 16:15:46 114

原创 boost库里boost::optional

//source code#include #include <boost/optional.hpp>#include using namespace std;int main() {std::vector<int> temp{1};auto out = boost::make_optional(temp);if(out == boost::none){ std::cout<<"boost::none"<<std::endl;}else

2020-06-04 16:01:56 317

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除