Skip to content

Is folly buildable/usable with c++17? #2553

@perseoGI

Description

@perseoGI

Greetings from @conan-io,

We are trying to update folly recipe in Conan Center Index: conan-io/conan-center-index#27995 (comment)
While testing, we found that trying to compile folly with C++17 throws several errors, among them:

folly/debugging/exception_tracer/ExceptionTracerLib.cpp:78:10: error: no member named 'erase' in namespace 'std'
   78 |     std::erase(*callbacks, f);
      |     ~~~~~^

It seems folly is directly using C++20 features in their source files. So I guess at least C++20 is needed in order to compile the library.

But is folly still safe to be used (as a dependency) from a C++17 context? Menaning that if this library (nowadays) is still think to be used from C++17.

In the project README, it clearly says that it is a C++17 library

https://github.com/facebook/folly/blob/main/README.md?plain=1#L13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions