mirror of
https://github.com/boostorg/json.git
synced 2026-02-01 08:32:13 +00:00
close #465 value_to and value_from was incorrectly deducing that std::string was "array-like" rather than "string-like", but only on msvc-14.0 Original test: template<class T, typename std::enable_if< std::is_constructible<remove_cvref<T>, const char*, std::size_t>::value && std::is_convertible<decltype(std::declval<T&>().data()), const char*>::value && std::is_convertible<decltype(std::declval<T&>().size()), std::size_t>::value >::type* = nullptr> Which works for all compilers except msvc-14.0 New test: template<class T, typename std::enable_if< std::is_constructible<remove_cvref<T>, const char*, std::size_t>::value && std::is_convertible<decltype(std::declval<T&>().data()), const char*>::value && std::is_integral<decltype(std::declval<T&>().size())>::value >::type* = nullptr> Note that each individual test works on all compilers. It seems to be the conjuction of tests that caused msvc-14 to trip up.