mirror of
https://github.com/triqs/dft_tools
synced 2024-11-01 19:53:45 +01:00
19 lines
429 B
C++
19 lines
429 B
C++
|
#include "triqs/clef.hpp"
|
||
|
|
||
|
namespace tql = triqs::clef;
|
||
|
// This macro just prints its argument literaly, and then its value
|
||
|
#define PRINT(X) std::cout << BOOST_PP_STRINGIZE((X)) << " ---> "<< (X) <<std::endl;
|
||
|
|
||
|
int main() {
|
||
|
|
||
|
tql::placeholder <1> x_;
|
||
|
tql::placeholder <2> y_;
|
||
|
|
||
|
PRINT ( x_ + 2*y_ );
|
||
|
PRINT (eval(x_ + 2*y_ , x_ = 1, y_ = 2));
|
||
|
PRINT (eval(x_ + 2*y_ , x_ = 1));
|
||
|
PRINT (eval(x_ + 2*y_ , x_ = x_ + y_));
|
||
|
|
||
|
}
|
||
|
|