#pragma once #ifndef MESSMER_CPPUTILS_POINTER_UNIQUE_REF_BOOST_OPTIONAL_GTEST_WORKAROUND_H #define MESSMER_CPPUTILS_POINTER_UNIQUE_REF_BOOST_OPTIONAL_GTEST_WORKAROUND_H /** * This is a workaround for using boost::optional> in gtest. * Without including this file, the linker will fail. */ //TODO Test that this solves the problem (add test unit file that doesn't compile without) #include "unique_ref.h" #include //gtest/boost::optional workaround for working with optional> namespace boost { template inline std::ostream& operator<<(std::ostream& out, const cpputils::unique_ref &ref) { out << ref.get(); return out; } } #endif