Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/ptr_container/test/sequence_point.cpp @ 33

Last change on this file since 33 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 546 bytes
Line 
1#include <iostream>
2
3
4struct Fun
5{
6    Fun()
7    {
8        std::cout << "fun" << std::endl;
9    }
10   
11    template< class T >
12    void operator()( T t )
13    {
14    }
15
16    template< class T >
17    Fun& operator,( T r ) 
18    {
19        return *this;
20    }
21};
22
23template< class T >
24Fun foo( T t )
25{
26    return Fun();
27}
28
29
30
31struct one
32{
33    one()
34    {
35        std::cout <<"one" << std::endl;
36    }
37};
38
39struct two
40{
41    two()
42    {
43        std::cout <<"two" << std::endl;
44    }
45};
46
47int main()
48{
49    foo( one() )( two() );
50
51    Fun(),one(),two(),one();
52}
Note: See TracBrowser for help on using the repository browser.