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
The following minimum sample fails to compile when using MSVC with /std:c++latest (C++20).
See: godbolt example
#include <vector>
#include <algorithm>
#include <boost/hof/proj.hpp>
#include <boost/hof/placeholders.hpp>
struct A
{
int i;
char c;
};
void foo(std::vector<A>& vec)
{
using namespace boost::hof;
std::sort(vec.begin(), vec.end(), proj(&A::i, _ < _));
}
The main issue is that HOF uses std::is_literal_type which was deprecated in C++17 and removed in C++20 and the Microsoft STL has removed it (link)
The text was updated successfully, but these errors were encountered:
pumkinpal
changed the title
Build Error C2039 with MSVC when using /std:c++latest (C++20) - std::is_literal_type removal
Build Error C2039 with MSVC when using /std:c++latest (C++20) - std::is_literal_type removed
Feb 1, 2021
The following minimum sample fails to compile when using MSVC with /std:c++latest (C++20).
See: godbolt example
The main issue is that HOF uses std::is_literal_type which was deprecated in C++17 and removed in C++20 and the Microsoft STL has removed it (link)
The text was updated successfully, but these errors were encountered: