degski wrote:
Assuming a non-header-only library for the sake of going back onto the topic, this would create exactly the problems we've been discussing, if you link your C++17 code to the C++14-built library, or vice versa. For what gainz?
I'm probably missing the point. If that C++17 (exe-code) and C++14 (library-code) are built with the same compiler (an unavoidable C++ problem, C is great in some sense!), unless the C++17 code is in the header, why would it cause problems?
Because if you have class X { private: beast::string_view sv_; public: // ... }; the class layout and size could change if you compile this in two translation units, one C++14 (uses boost::string_view), one C++17 (uses std::string_view). Same with optional.