You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
std::is_literal_type was deprecated in C++17 and removed in C++20. Section [diff.cpp17.depr]/7 of the C++20 Working Draft explains:
The traits had unreliable or awkward interfaces. The is_literal_type trait provided no way to detect which subset of constructors and member functions of a type were declared constexpr.
: public sprout::detail::type_traits_wrapper<std::is_literal_type<T> >
In /std:c++17 mode, this triggers a deprecation warning in recent versions of MSVC. In /std:c++latest mode, now that microsoft/STL#380 has been merged, this will trigger an error in VS 2019 16.6 Preview 2.
MSVC provides "escape hatch" macros that can be defined project-wide to suppress the deprecation warning and restore the removed type trait. (Specifically, compiling with /D_SILENCE_CXX17_IS_LITERAL_TYPE_DEPRECATION_WARNING and /D_HAS_DEPRECATED_IS_LITERAL_TYPE=1.) However, it's best to avoid using this deprecated/removed machinery entirely.
I see at least three uses of sprout::is_literal_type throughout your codebase, but I'm uncertain as to how it's being used. I looked at prev, where it appears to be dispatching to logarithmic-depth recursion, possibly as a workaround when C++14 extended constexpr is unavailable. If all uses of is_literal_type are for dealing with the limitations of C++11 classic constexpr, you may want to detect whether C++14 extended constexpr is available, and if so, avoid is_literal_type entirely (which should solve the deprecation/removal issue with the latest versions of MSVC).
The text was updated successfully, but these errors were encountered:
std::is_literal_type
was deprecated in C++17 and removed in C++20. Section [diff.cpp17.depr]/7 of the C++20 Working Draft explains:This trait is being directly used here:
Sprout/sprout/type_traits/is_literal_type.hpp
Line 21 in 6b5addb
In
/std:c++17
mode, this triggers a deprecation warning in recent versions of MSVC. In/std:c++latest
mode, now that microsoft/STL#380 has been merged, this will trigger an error in VS 2019 16.6 Preview 2.MSVC provides "escape hatch" macros that can be defined project-wide to suppress the deprecation warning and restore the removed type trait. (Specifically, compiling with
/D_SILENCE_CXX17_IS_LITERAL_TYPE_DEPRECATION_WARNING
and/D_HAS_DEPRECATED_IS_LITERAL_TYPE=1
.) However, it's best to avoid using this deprecated/removed machinery entirely.I see at least three uses of
sprout::is_literal_type
throughout your codebase, but I'm uncertain as to how it's being used. I looked atprev
, where it appears to be dispatching to logarithmic-depth recursion, possibly as a workaround when C++14 extendedconstexpr
is unavailable. If all uses ofis_literal_type
are for dealing with the limitations of C++11 classicconstexpr
, you may want to detect whether C++14 extendedconstexpr
is available, and if so, avoidis_literal_type
entirely (which should solve the deprecation/removal issue with the latest versions of MSVC).The text was updated successfully, but these errors were encountered: