Skip to content

util/dynamic_library: Add missing include for <memory>

Jami Kettunen requested to merge fix-compile into main

Fixes the following compile error seen with GCC 10.2 (Void Linux):

In file included from ../src/biometry/util/dynamic_library.cpp:20:
../src/biometry/util/dynamic_library.h:99:31: error: 'shared_ptr' in namespace 'std' does not name a template type
   99 |     DynamicLibrary(const std::shared_ptr<Api>& api, const boost::filesystem::path& path);
      |                               ^~~~~~~~~~
../src/biometry/util/dynamic_library.h:27:1: note: 'std::shared_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
   26 | #include <boost/filesystem.hpp>
  +++ |+#include <memory>
   27 |

This should also fix the FTBFS seen on Debian as reported by @sunweaver.

Reference: https://en.cppreference.com/w/cpp/memory/shared_ptr

Merge request reports