Assembla home | Assembla project page
 

Changeset 121

Show
Ignore:
Timestamp:
11/10/07 11:57:20 (1 year ago)
Author:
sergey_shandar
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cbear.berlios.de/cast/test.cpp

    r114 r121  
    1212#include <cbear.berlios.de/cast/explicit.hpp> 
    1313#include <cbear.berlios.de/cast/default.hpp> 
     14 
     15#include <iostream> 
    1416 
    1517class MyClass  
     
    4345        void g() 
    4446        { 
     47        } 
     48}; 
     49 
     50struct throw_sfinae 
     51{ 
     52        struct sfinae 
     53        { 
     54        }; 
     55        explicit throw_sfinae(int) 
     56        { 
     57                throw sfinae(); 
    4558        } 
    4659}; 
     
    8699        p; 
    87100        int* p1 = cast::reinterpret::value(i1); 
     101        try 
     102        { 
     103                d dd; 
     104                throw_sfinae &ts = cast::dynamic::ref(dd); 
     105        } 
     106        catch(...) 
     107        { 
     108                ::std::cout << "Good" << ::std::endl; 
     109        } 
    88110}