diff --git a/src/device_trezor/device_trezor_base.hpp b/src/device_trezor/device_trezor_base.hpp index 04431c706..f6eb01a18 100644 --- a/src/device_trezor/device_trezor_base.hpp +++ b/src/device_trezor/device_trezor_base.hpp @@ -34,6 +34,7 @@ #include #include #include +#include #include "device/device.hpp" #include "device/device_default.hpp" #include "device/device_cold.hpp" @@ -146,7 +147,7 @@ namespace trezor { bool open_session = false) { // Require strictly protocol buffers response in the template. - BOOST_STATIC_ASSERT(boost::is_base_of::value); + static_assert(std::is_base_of_v); const bool accepting_base = boost::is_same::value; if (resp_types && !accepting_base){ throw std::invalid_argument("Cannot specify list of accepted types and not using generic response"); diff --git a/src/device_trezor/trezor/debug_link.hpp b/src/device_trezor/trezor/debug_link.hpp index 3665b65c7..57aceecc9 100644 --- a/src/device_trezor/trezor/debug_link.hpp +++ b/src/device_trezor/trezor/debug_link.hpp @@ -32,6 +32,7 @@ #include "transport.hpp" #include "messages/messages-debug.pb.h" +#include namespace hw { @@ -60,7 +61,7 @@ namespace trezor { const boost::optional &resp_type = boost::none, bool no_wait = false) { - BOOST_STATIC_ASSERT(boost::is_base_of::value); + static_assert(std::is_base_of_v); m_transport->write(req); if (no_wait){ diff --git a/src/device_trezor/trezor/messages_map.hpp b/src/device_trezor/trezor/messages_map.hpp index 5a795aea3..4e7b6dced 100644 --- a/src/device_trezor/trezor/messages_map.hpp +++ b/src/device_trezor/trezor/messages_map.hpp @@ -72,14 +72,14 @@ namespace trezor { template static messages::MessageType get_message_wire_number() { - BOOST_STATIC_ASSERT(boost::is_base_of::value); + static_assert(std::is_base_of_v); return get_message_wire_number(t_message::default_instance().GetDescriptor()->name()); } }; template std::shared_ptr message_ptr_retype(std::shared_ptr & in){ - BOOST_STATIC_ASSERT(boost::is_base_of::value); + static_assert(std::is_base_of_v); if (!in){ return nullptr; } @@ -89,7 +89,7 @@ namespace trezor { template std::shared_ptr message_ptr_retype_static(std::shared_ptr & in){ - BOOST_STATIC_ASSERT(boost::is_base_of::value); + static_assert(std::is_base_of_v); if (!in){ return nullptr; } diff --git a/src/device_trezor/trezor/transport.hpp b/src/device_trezor/trezor/transport.hpp index 9ac95f3bb..32c73ebd7 100644 --- a/src/device_trezor/trezor/transport.hpp +++ b/src/device_trezor/trezor/transport.hpp @@ -383,7 +383,7 @@ namespace trezor { boost::optional resp_type = boost::none) { // Require strictly protocol buffers response in the template. - BOOST_STATIC_ASSERT(boost::is_base_of::value); + static_assert(std::is_base_of_v); // Write the request transport.write(req);