Boost logo

Boost Users :

Subject: Re: [Boost-users] [mpl] newbie question about if_c et al
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2009-04-07 10:13:35


Just a question on your discussion. Why not to let mpl::if choose an
appropriate overload, like:

//... somewher in c

private:
  inline void functionality_impl()const/or non const
  {
      //make impl here
  }

  inline void f()
  {
     f<typename mpl::if_c<SYNCH, ScopedCriticalSection, void*>::type>();
  }

 template<class T>
 void f();

 void f<ScopedCriticalSection>()
 {
    scs(cs);
    functionality_impl();
 }

 void f<void*>()
 {
   functionlity_impl();
 }

Greetings,
Ovanes



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net