
typedef struct { char ar[1]; }     one_type;
typedef struct { char ar[2]; }     two_type;


template <typename T>
one_type has_value_type_function(...);

template <typename T>
two_type has_value_type_function(typename T::value_type const volatile *);

template <typename T>
struct has_value_type
{
    typedef T   test_type;

private:
    static T    t;
public:

    enum { value = sizeof(has_value_type_function<T>(0)) == sizeof(two_type) };
};



class Class_with_value_type
{
public:
	typedef int	value_type;
};

enum { Class_with_value_type_HAS_IS	=	has_value_type<Class_with_value_type>::value };


class Class_without_value_type
{
};

enum { Class_without_value_type_HAS_IS	=	has_value_type<Class_without_value_type>::value };


