C++14-Compatible WinReg

I got several requests by people asking to make my C++ WinReg code (which has been using C++17 in its main branch since many months) compile on older C++14 compilers (like VS 2017 in C++14 mode).

Now you can find the C++14-compatible version in this branch.

To make the code C++14-compatible, among other things, I removed the use of [[nodiscard]], removed std::variant (simply substituted with a couple of data members), and replaced the non-const std::wstring::data() method with &s[0].


Exceptions or Error Return Codes?

In the initial version of my WinReg C++ library, I made a design decision that methods that wrapped Win32 Registry C API calls would throw C++ exceptions on errors.

Important feedback I got from the users of this library was that they wanted methods that returned error codes instead of throwing exceptions (e.g., see this issue).

For example, when opening a registry key, folks want to be able to check the result of the operation without having exceptions thrown from failed opens. Similarly when trying to read values from the registry.

This is a good remainder for those C++ devs who think that we should always throw exceptions instead of using error return codes!