Looks promising!BTW, you can simplify the code a little using `std::true_type` / `std::false_type`:
http://en.cppreference.com/w/cpp/types/ ... constantIn particular:template <typename T, typename _ = void> struct is_vector : std::false_type { };Come to think of it, `std::is_same` itself is already derived in this way:
http://en.cppreference.com/w/cpp/types/is_samePerhaps you could write `is_vector` as an alias template?Consider:
http://en.cppreference.com/w/cpp/language/type_alias// This compiles in isolation but doesn't seem to work just yet when plugged into your code in place of `is_vector`; did I miss something / intent?//// template <typename T> // using is_vector = typename std::is_same<T, std::vector<typename T::value_type, typename T::allocator_type>>;EDIT: readability improvement so far:// If we're targeting C++14 might as well use std::enable_if_t// `is_same_v` would've helped, too, but not sure if that's in:
http://www.open-std.org/jtc1/sc22/wg21/ ... 3854.htm// At least, while still using `std::is_same`, we can replace `::value` with `{}()` -- this yields significant readability improvement in `invoke#1`// see N3545 "An Incremental Improvement to integral_constant" by Walter E. Brown//
http://www.open-std.org/jtc1/sc22/wg21/ ... /n3545.pdf