boostorg / boostorg/hof

Build Error C2039 with MSVC when using /std:c++latest (C++20) - std::is_literal_type removed

Open
#215 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
509
Forks
94
PR merge metrics
No merged PRs in 30d

Description

The following minimum sample fails to compile when using MSVC with /std:c++latest (C++20).
See: [godbolt example](https://godbolt.org/z/dEcGEs)

```
#include
#include
#include
#include

struct A
{
int i;
char c;
};

void foo(std::vector& 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](https://github.com/bolero-MURAKAMI/Sprout/issues/95))

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.