The outer part is of course quite easy. Use boost::mpl::if_ to decide which int_ type to return from your metafunction and then access the value in it. No big deal.
The part where you try to find out if type X has a function f() is still fairly straight forward but unfortunately you'll not find a generic answer. Every time you need this kind of inspection you'll have to write a custom metafunction to find it out. Use SFINAE:
template < typename T >
struct has_foo
{
typedef char (&no) [1];
typedef char (&yes) [2];
template < void (T::*)() >
struct dummy {};
template < typename S >
static yes check( dummy<&S::foo> *);
template < typename S >
static no check( ... );
enum { value = sizeof(check<T>(0)) == sizeof(yes) };
};
Edit: Oh, and create a checker for your static const L with BOOST_MPL_HAS_XXX()