TartanLlama / optional

C++11/14/17 std::optional with functional-style extensions and reference support
https://tl.tartanllama.xyz
Creative Commons Zero v1.0 Universal
859 stars 67 forks source link

Compile warnings with Clang #8

Closed atorger closed 6 years ago

atorger commented 6 years ago

There are some warnings when compiling with Clang, for example 3.9 as seen here: https://travis-ci.org/TartanLlama/optional/jobs/355253237

As we build with warnings == errors our project doesn't pass without patching the code.

It's simple to fix just by doing as Clang says in the warnings. I'm not a C++ guru though so I don't know if there are any drawbacks with adding those "const".

TartanLlama commented 6 years ago

Thanks for the report! Those functions shouldn't be marked constexpr in C++11, so I've made it conditional on the compilation mode.