Can I use a static library compiled with C++17 in a project where it compiles with C++14?

Viewed 323

I have a project that written in C++17, let's name it A. It's using some C++17 specific features like std::optional, inline variables and etc...

My question is can I use that project as a third party library in a C++14 project (let's say project B) by compiling project A as static library and then use it in project B ? Even though headers of project A still has some functions and variables that declared using C++17 features ?

0 Answers
Related