1 #pragma once 2 #include <iostream> 3 #include <sdbusplus/asio/connection.hpp> 4 5 namespace mapbox 6 { 7 template <typename T, typename... Types> 8 const T* getPtr(const mapbox::util::variant<Types...>& v) 9 { 10 if (v.template is<std::remove_const_t<T>>()) 11 { 12 return &v.template get_unchecked<std::remove_const_t<T>>(); 13 } 14 else 15 { 16 return nullptr; 17 } 18 } 19 } // namespace mapbox 20 21 namespace crow 22 { 23 namespace connections 24 { 25 static std::shared_ptr<sdbusplus::asio::connection> systemBus; 26 27 } // namespace connections 28 } // namespace crow 29