This code
#include <iterator>
#include <type_traits>
static_assert(std::is_same_v<typename std::iterator_traits<volatile int *>::value_type, volatile int>);
compiles on latest GCC and clang, but fails on MSVC 2019, that seems to remove volatile qualifier. See here on godbolt.
The const is removed, due to the standard specialization of std::iterator_traits for const T* and T*, but I think volatile should be kept.
Who is right?
Edit: I'm compiling with C++17.