Intermediate results using expression templates

前端 未结 2 1344
迷失自我
迷失自我 2020-12-18 09:57

in C++ Template Metaprogramming : Concepts, Tools, and Techniques from Boost and Beyond

... One drawback of expression templates is that they tend to

2条回答
  •  感情败类
    2020-12-18 10:33

    For now, you can always use BOOST_AUTO() in the place of C++0x's auto keyword to get intermediate results more easily.

    Matrix x, y;
    BOOST_AUTO(result, (x + y) * (x + y)); // or whatever.
    

提交回复
热议问题