Almost there. What you need to remember, as you said in the comments, is that constructors do not have return types. The usual SFINAE return type trick will not work for them.
, , SFINAE. , ( ::value
), - c'tor:
template<typename T>
class Buffer
{
public:
template <typename InputIter,
typename std::enable_if<std::is_same<typename std::iterator_traits<InputIter>::value_type, T>::value, int>::type = 0>
Buffer(InputIter first, InputIter last)
{
}
};
, , int = 0
, , SFINAE! C'tor .