240 发简信
IP属地:江苏
  • Resize,w 360,h 240
    functor

    所有的仿函数适配器要想融入STL,都必须继承以上两种unary_function或binary_function之一。继承之后,就有了参数的类型...

  • Resize,w 360,h 240
    2020-03-23

    #include<typeinfo> vector v; cout<<typeif(v).name();

  • Resize,w 360,h 240
    traits

    用iterator举例,当模板函数在声明时,看起来可能像是这样: template<class T> void algorithm(T a,T ...

  • Resize,w 360,h 240
    C++ 内存管理小知识点

    C++里的各种new底层也都是malloc,而malloc调用的时候会附带一部分overhead。所以,细碎的申请memory效率是不如一下子申...

  • 模板元enum小例子

    template struct Fact { enum { value = Fact<N - 1>::value + Fact<N ...

  • 新标准的模板元方法

    template struct F { static constexpr int Value = [] { if constexpr...

  • 编译器求值

    constexpr int f(int n) { if (n < 6)return n; else return f(n - 1) + ...

  • operator new和placement new的例子

    auto *p=operator new(sizeof(int)); auto *pp=static_cast (p); auto r=...

  • Resize,w 360,h 240
    2019-11-18

    图来自bilibili秦春林的视频,渲染的秘密。 单位方向,单位面积的辐射通量,单位方向可能会对应很大或者很小的面积,辐射通量除以方向再除以面积...