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

Added explicit default initialization in copy constructor #45

Closed sergio-eld closed 3 years ago

sergio-eld commented 3 years ago

Copy constructor produces warnings, thus failing the build with -Werror=all. Added explicit initialization.

../3rdparty/optional/include/tl/optional.hpp:455:3: error: base class 'struct tl::detail::optional_operations_base<std::__cxx11::basic_string<char> >' should be explicitly initialized in the copy constructor [-Werror=extra]
  455 |   optional_copy_base(const optional_copy_base &rhs) {
      |   ^~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
TartanLlama commented 3 years ago

I think it'd be better to initialize optional_operations_base directly rather than having a delegating constructor

sergio-eld commented 3 years ago

I've changed to explicit base constructor initialization. Also added CLion-related files to .gitignore

artivis commented 3 years ago

Hi, any ETA on this PR?

sergio-eld commented 3 years ago

@TartanLlama