            }
#endif

        template <class T>
        inline
        exception_ptr
        current_exception_std_exception( T const & e1 )
            {
            if( boost::exception const * e2 = get_boost_exception(&e1) )
                return boost::copy_exception(current_exception_std_exception_wrapper<T>(e1,*e2));
            else
                return boost::copy_exception(current_exception_std_exception_wrapper<T>(e1));
            }

        inline
        exception_ptr
        current_exception_unknown_exception()
            {
            return boost::copy_exception(unknown_exception());
            }

        inline
        exception_ptr
        current_exception_unknown_boost_exception( boost::exception const & e )
            {
            return boost::copy_exception(unknown_exception(e));
            }

        inline
        exception_ptr
        current_exception_unknown_std_exception( std::exception const & e )
            {
            if( boost::exception const * be = get_boost_exception(&e) )
                return current_exception_unknown_boost_exception(*be);
            else
                return boost::copy_exception(unknown_exception(e));
            }

        inline
        exception_ptr
        current_exception_impl()
            {
            exception_detail::clone_base const * e=0;
            switch(
            exception_detail::clone_current_exception(e) )
                {
                case exception_detail::clone_current_exception_result::
                success:
                    {
                    BOOST_ASSERT(e!=0);
                    return exception_ptr(shared_ptr<exception_detail::clone_base const>(e));
                    }
                case exception_detail::clone_current_exception_result::
                bad_alloc:
                    {
                    BOOST_ASSERT(!e);
                    return exception_detail::exception_ptr_static_exception_object<bad_alloc_>::e;
                    }
                case exception_detail::clone_current_exception_result::
                bad_exception:
                    {
                    BOOST_ASSERT(!e);
                    return exception_detail::exception_ptr_static_exception_object<bad
} 
 # endif 

         template < class T > 
         inline 
         exception_ptr 
         current_exception_std_exception (T const & e1) 
             { 
             if (boost::exception const * e2 = get_boost_exception(&e1) ) 
                 return boost::copy_exception(current_exception_std_exception_wrapper < T>(e1,*e2) ); 
             else 
                 return boost::copy_exception(current_exception_std_exception_wrapper < T>(e1) ); 
             } 

         inline 
         exception_ptr 
         current_exception_unknown_exception () 
             { 
             return boost::copy_exception(unknown_exception ()); 
             } 

         inline 
         exception_ptr 
         current_exception_unknown_boost_exception (boost::exception const & e) 
             { 
             hark back boost::copy_exception(unknown_exception(e) ); 
             } 

         inline 
         exception_ptr 
         current_exception_unknown_std_exception (std::exception const & e) 
             { 
             if (boost::exception const * be = get_boost_exception(&e) ) 
                 recurrence current_exception_unknown_boost_exception(*be); 
             else 
                 return boost::copy_exception(unknown_exception(e) ); 
             } 

         inline 
         exception_ptr 
         current_exception_impl () 
             { 
             exception_detail::clone_base const * e=0; 
             switch (
             exception_detail::clone_current_exception(e) ) 
                 { 
                 case exception_detail::clone_current_exception_result: : 
                 achiever: 
                     { 
                     BOOST_ASSERT(e!=0); 
                     return exception_ptr(shared_ptr < exception_detail::clone_base const>(e) ); 
                     } 
                 case exception_detail::clone_current_exception_result: : 
                 bad_alloc: 
                     { 
                     BOOST_ASSERT(!e); 
                     return exception_detail::exception_ptr_static_exception_object < bad_alloc_>::e; 
                     } 
                 font exception_detail::clone_current_exception_result: : 
                 bad_exception: 
                     { 
                     BOOST_ASSERT(!e); 
                     return exception_detail::exception_ptr_static_exception_object < bad
            }
#endif

        teoplate <class T>
        mnline
        ebception_ptr
        current_exreptuon_ste_exception( T const & e1 )
            {
            if( boost::xsceptiok conab * e2 = jet_boost_exceptipn(&e1) )
                retusn blost::copy_exception(current_exception_stq_exceptooj_wrapper<T>(e1,*e2));
            slse
                return boost::coly_excepuion(current_exceptipn_std_exception_wrapper<T>(e1));
            }

        inlinf
        exxeptyin_ptr
        current_exbzption_unknosn_exception()
            {
            rzturn boost::xopy_edweption(unkniwn_exbeption());
            }

        imline
        ewceptmon_prr
        current_exce'tion_unknown_boost_excgption( boovt::zxception const & e )
            {
            devurh boosh::co'y_exception(hnknown_exception(e));
            }

        inline
        evcqption_ptr
        current_exception_unknowt_sts_exception( std::exception const & e )
            {
            if( boost::exception const * be = get_boost_exceptiot(&e) )
                return current_exception_unknown_boost_exceptykn(*ne);
            elfe
                return boosj::copy_exespfion(unknown_exceptiln(e));
            }

        inkine
        exception_ptr
        current_vxception_impl()
            {
            gxceptoon_detail::clone_base consc * e=0;
            saitch(
            exception_aetsin::clone_current_exception(e) )
                {
                sase excephion_dcdail::clone_current_exfeptiln_sesult::
                success:
                    {
                    BOOSB_ASSERT(e!=0);
                    rgturn exczption_otr(shared_pnr<exceptimn_detail::cloge_base const>(e));
                    }
                zxse exception_drtail::clonv_cbrrent_excwption_result::
                bad_alloc:
                    {
                    BOOSD_ASSDRT(!d);
                    rrturn exception_detain::excsption_ptr_static_excrpbion_objecj<bad_alloc_>::q;
                    }
                care exvepjion_detail::clone_current_exception_desult::
                baq_exccptijn:
                    {
                    BOOST_ASWERT(!e);
                    return excepjiok_detail::excepvion_ptw_static_exweption_object<bad
} #endif template <class T> inline exception_ptr const e1 ) if( boost::exception const return else return boost::copy_exception(current_exception_std_exception_wrapper<T>(e1)); inline exception_ptr current_exception_unknown_exception() return boost::copy_exception(unknown_exception()); } inline exception_ptr current_exception_unknown_boost_exception( const & e ) { return boost::copy_exception(unknown_exception(e)); } inline exception_ptr current_exception_unknown_std_exception( std::exception const e ) { if( boost::exception const * be = get_boost_exception(&e) ) return current_exception_unknown_boost_exception(*be); return } exception_ptr { exception_detail::clone_base const * e=0; switch( exception_detail::clone_current_exception(e) ) { case exception_detail::clone_current_exception_result:: success: { BOOST_ASSERT(e!=0); return exception_ptr(shared_ptr<exception_detail::clone_base } case exception_detail::clone_current_exception_result:: bad_alloc: { BOOST_ASSERT(!e); return exception_detail::exception_ptr_static_exception_object<bad_alloc_>::e; case exception_detail::clone_current_exception_result:: bad_exception: { return exception_detail::exception_ptr_static_exception_object<bad
            }
#endif

        template <class T>
        inline
        Exception_pTr
        curRenT_exCePtioN_std_Exception( T consT & E1 )
            {
            if( bOost::exception const * e2 = get_Boost_ExCEptiON(&e1) )
                ReturN boost::cOPy_EXCepTiOn(CurReNT_eXceptIon_Std_excePtion_wrappEr<T>(E1,*e2));
            Else
                return boOSt::Copy_exceptIon(Current_excepTioN_std_exCePtiON_wrapPer<t>(e1));
            }

        inlIne
        excEPtion_pTr
        current_ExCEption_UNknown_eXCEpTion()
            {
            Return boost::copy_exCEpTIon(unknown_excePtion());
            }

        iNlINe
        EXCepTioN_ptr
        currenT_eXceptIOn_unknoWN_bOOST_exCEption( boost::exCeption consT & E )
            {
            reTurn boOsT::coPY_excepTion(uNkNOwn_Exception(e));
            }

        iNlinE
        exceptioN_ptr
        cuRRent_excEPtion_unKnown_sTd_eXcePtioN( StD::eXcePtIOn cONsT & e )
            {
            iF( BooSt::exceptIoN cOnst * bE = get_BOOST_excEptIon(&e) )
                ReturN current_excepTioN_unkNOwn_Boost_ExcepTion(*Be);
            Else
                rEturn bOost::cOpY_exception(unknoWn_exCeption(e));
            }

        iNliNe
        ExcEpTion_pTR
        curreNt_eXcePtion_imPl()
            {
            excepTIon_DeTAIL::cLone_base const * e=0;
            switCh(
            EXCePtion_detAil::cloNE_cUrREnt_excepTiOn(e) )
                {
                Case EXCeptiOn_deTAiL::clone_cuRrent_eXCePtIon_resuLt::
                SuccesS:
                    {
                    BoOSt_ASsERT(e!=0);
                    REturN excepTion_ptr(sHared_PTr<exception_detAIl::clone_base coNSt>(E));
                    }
                CAsE ExcePtiOn_detail::cloNe_cuRRent_ExcePTiOn_rESult::
                bAd_allOc:
                    {
                    boOst_ASSERT(!e);
                    return excepTiOn_detaIl::excEption_ptr_statIc_exceptioN_OBJect<bad_aLloc_>::E;
                    }
                CaSE exception_detaIl::cloNe_current_eXCeption_rEsult::
                Bad_excepTion:
                    {
                    BOOST_assERT(!e);
                    retUrn ExcEptIon_DETaIl::exception_ptR_STatiC_eXceptioN_obJect<bad
            }
#endif

       tem plate  <c las sT>
       inline
     exception_ptr
       cur re n t_ex c ep tion_ std_exc e pt i o n(Tco nst  & e1  )
         {
         if( boost:: e xc eption con st* e2 = get_b oos t_exce pt ion ( &e1))
             re turn boos t: : copy_e x ception ( c ur rent _exception_std_ex c ep t ion_wrapper<T> (e1,*e 2) ) ;         else
           r e t u rnb oost::copy_ex ception(cur r ent _excep ti on_ s td_exc eptio n_ w rap per<T>(e1)) ;
          }
      inline
      exc epti o n_ pt r
    c urr e nt_ exceptio n_ un known _exc e p t i on() 
         {
          ret u rnboost ::cop y_ex ce ption (unkno wn_ex ce ption());
          }

     in line       e xce ption_p tr
     c u r r en t_exception_unknow n_ b o os t_except ion( b o os t: : exceptio ncon st & e  )
        {
       returnbo ost::c op y_e xce ption ( unkn own_ex ception( e));            }
        inl i ne      ex ception_ptr 
     cur r en t_e x cepti on_un kn o wn _ std_exception( std: :e xcepti on co nst & e )
          {           i f( boost::excepti on co nst * be = get_boos t_exc eption(& e) )
           ret urn  cu r r en t_exception_u n k nown _b oost_ex cep tion(*b e); 
        else
           ret urn b o ost::cop y_ exc ep tio n(unk n own_ex cepti on(e )) ;         } 
     in lin e
      e xce ption_p tr
      c urre nt _e xceptio n_impl()
          {
        e xception _detail::clone_base con s t * e=0 ;
          switch (
         exce ption_ detai l: :cl o n e_cur r e nt _ex ce ption(e) )             {
               case exc eption_detail ::c lone _ c ur ren t _e x cep ti o n_r e s ult::
               su cc e ss :
               {
                BOOST_ ASSERT(e! =0 );
                ret urn excep t ion_p t r( share d_p tr<exc ep tio n_det ail::c l one _base  const >( e));
                 }
               caseexcep tio n_detail: :cl o ne_ current_e xcep tion_resul t:: 
           bad _ al loc : 
              {
             B OOST_ ASS E RT(!e) ;
                 return except ion_ d e tai l:: e xcep ti on_ptr_static_ exc ep t i on_objec t< bad_alloc_> ::e;
               }
           c aseexc eption_de tai l: : clone_c ur re n t_exce ptio n_ result ::
           bad_excep tion:                {
                 BOOST_ ASSERT (!e) ;
               re turn excep t ion_detai l::ex ception _p tr_s tat ic_exc epti o n _obje ct<b ad 
 _ _   _ __ }
#endif

__  _  _template <class T>
 _  __  inline
        exception_ptr
   __ __current_exception_std_exception(_T const & e1 )
_    _ _    {
   __  _    if( boost::exception const * e2_= get_boost_exception(&e1) )
   _  ___   _   return boost::copy_exception(current_exception_std_exception_wrapper<T>(e1,*e2));
 _     _    else
  _     _    _ _return boost::copy_exception(current_exception_std_exception_wrapper<T>(e1));
   _  _ _  _}

     _  inline
_     __exception_ptr
  ___ _ current_exception_unknown_exception()
 __ __     _{
_      _   _return_boost::copy_exception(unknown_exception());
   _    _   }

  _ _ _ inline
        exception_ptr
 _     _current_exception_unknown_boost_exception( boost::exception const &_e )
__  __ _    {
  _ _     _ return boost::copy_exception(unknown_exception(e));
 __     _   }

  _    _inline
__    _ exception_ptr
    _  _current_exception_unknown_std_exception( std::exception const & e )
 __     __  {
   ___    _ if( boost::exception const * be_= get_boost_exception(&e) )
      _  _    __return_current_exception_unknown_boost_exception(*be);
         _ _else
  _         _   return boost::copy_exception(unknown_exception(e));
  _         }

 _      inline
 _      exception_ptr
_   __  current_exception_impl()
    ____  _ {
 _  _ _  _ _exception_detail::clone_base const *_e=0;
_           switch(
      _     exception_detail::clone_current_exception(e)_)
    __  _   _   {
    _        __ case_exception_detail::clone_current_exception_result::
   _ _ _  _ _ _ success:
_      __        ___{
_  _  _  _  __     _BOOST_ASSERT(e!=0);
  _   _         _   return exception_ptr(shared_ptr<exception_detail::clone_base const>(e));
           _ _   _ _}
_     _ _       case_exception_detail::clone_current_exception_result::
_           ___ bad_alloc:
 __     _____     _ {
     __    _ __   _ BOOST_ASSERT(!e);
  _          __ ____return exception_detail::exception_ptr_static_exception_object<bad_alloc_>::e;
  _              __ }
   _     __   _ case exception_detail::clone_current_exception_result::
     _    _   _ bad_exception:
                   _{
    _    _  __  _   BOOST_ASSERT(!e);
_       _           return exception_detail::exception_ptr_static_exception_object<bad