3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-26 14:23:38 +01:00
dft_tools/test/triqs/gf/wrap_tech.cpp
Olivier Parcollet f2c7d449cc First commit : triqs libs version 1.0 alpha1
for earlier commits, see TRIQS0.x repository.
2013-07-17 19:24:07 +02:00

24 lines
387 B
C++

#include <iostream>
struct infty {};
template<typename T> struct wrap {
T x;
wrap(T const & x_): x(x_) {}
operator infty() const { return infty();}
operator T () const { return x;}
};
double g(infty) { return 3;}
double f(double) { return 30;}
int main() {
wrap<double> w(2);
std::cout << w +1 <<std::endl;
std::cout << g(w) <<std::endl;
std::cout << f(w) <<std::endl;
}