Project

General

Profile

Bug #11576

Updated by Kefu Chai over 4 years ago

<pre>
CXX mon/OSDMonitor.lo
In file included from /usr/include/boost/variant.hpp:22:0,
from ./common/cmdparse.h:9,
from ./common/ceph_context.h:25,
from ./common/Mutex.h:20,
from ./common/Throttle.h:7,
from ./msg/Message.h:28,
from ./msg/Messenger.h:23,
from mon/OSDMonitor.h:29,
from mon/OSDMonitor.cc:22:
/usr/include/boost/variant/get.hpp: In instantiation of ‘typename boost::add_reference<const U>::type boost::strict_get(const boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>&) [with U = int; T0 = std::basic_string<char>; T1 = bool; T2 = long int; T3 = double; T4 = std::vector<std::basic_string<char> >; T5 = boost::detail::variant::void_; T6 = boost::detail::variant::void_; T7 = boost::detail::variant::void_; T8 = boost::detail::variant::void_; T9 = boost::detail::variant::void_; T10 = boost::detail::variant::void_; T11 = boost::detail::variant::void_; T12 = boost::detail::variant::void_; T13 = boost::detail::variant::void_; T14 = boost::detail::variant::void_; T15 = boost::detail::variant::void_; T16 = boost::detail::variant::void_; T17 = boost::detail::variant::void_; T18 = boost::detail::variant::void_; T19 = boost::detail::variant::void_; typename boost::add_reference<const U>::type = const int&]’:
/usr/include/boost/variant/get.hpp:299:25: required from ‘typename boost::add_reference<const U>::type boost::get(const boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>&) [with U = int; T0 = std::basic_string<char>; T1 = bool; T2 = long int; T3 = double; T4 = std::vector<std::basic_string<char> >; T5 = boost::detail::variant::void_; T6 = boost::detail::variant::void_; T7 = boost::detail::variant::void_; T8 = boost::detail::variant::void_; T9 = boost::detail::variant::void_; T10 = boost::detail::variant::void_; T11 = boost::detail::variant::void_; T12 = boost::detail::variant::void_; T13 = boost::detail::variant::void_; T14 = boost::detail::variant::void_; T15 = boost::detail::variant::void_; T16 = boost::detail::variant::void_; T17 = boost::detail::variant::void_; T18 = boost::detail::variant::void_; T19 = boost::detail::variant::void_; typename boost::add_reference<const U>::type = const int&]’
./common/cmdparse.h:47:26: required from ‘bool cmd_getval(CephContext*, const cmdmap_t&, std::string, T&) [with T = int; cmdmap_t = std::map<std::basic_string<char>, boost::variant<std::basic_string<char>, bool, long int, double, std::vector<std::basic_string<char> > > >; std::string = std::basic_string<char>]’
mon/OSDMonitor.cc:3178:54: required from here
/usr/include/boost/variant/get.hpp:195:48: error: invalid application of ‘sizeof’ to incomplete type ‘boost::STATIC_ASSERTION_FAILURE<false>’
Makefile:16427: recipe for target 'mon/OSDMonitor.lo' failed
</pre>

see http://www.boost.org/doc/libs/1_58_0/doc/html/boost/relaxed_get.html and http://www.boost.org/doc/libs/1_58_0/doc/html/boost/get_idp295310448.html, boost 1.58 introduced "strict_get" "strict_get". and @boost::get@ is an alias of it. but we are using @boost::get<int>(tuple<int64, ...>)@ @boost::get<index>(tuple)@ instead of @boost::get<type_name>(tuple)@.

Back