#include <iostream>
#include <type_traits>
#include <stdexcept>
#include <utility>

template <class Object, class MemFun, class... Args>
struct HasNoExceptMemFun
{
	static constexpr bool value =
	    noexcept (((std::declval <Object> ()).*(MemFun ()))(std::declval <Args>()...));
};

template <bool which>
class Is;

template <>
struct Is <false>
{
	void operator () ()
	{
	    std::cout << "false" << std::endl;
	}
};

template <>
struct Is <true>
{
	void operator () ()
	{
	    std::cout << "true" << std::endl;
	}
};

class Foo
{
	Foo (int) {}
	
	public:
	
		void Baz (int) noexcept (true)
		{
		}
};

class Bar
{
	public:
	
		void Baz (int) throw (std::runtime_error)
		{
			throw std::runtime_error ("help!");
		}
};

template <typename T, typename F>
struct selection
{
	static void dispatch ()
	{
	    Is <HasNoExceptMemFun <T, F, int>::value> () ();
	}
};

int main() {
	selection <Foo, decltype (&Foo::Baz)>::dispatch ();
	selection <Bar, decltype (&Bar::Baz)>::dispatch ();
	return 0;
}