Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got to compile with modern C++ except one frickin bit: pVar ostream #9

Open
hopeseekr opened this issue Sep 28, 2020 · 0 comments
Open

Comments

@hopeseekr
Copy link

In pVar.cpp:

std::ostream& operator << (std::ostream& os, const pVar& v)
{
    return os << v.pVarData_ << std::endl;
}

It is beyond my C++ powers and nothing on Google helps.

An absolute huge error wall, but here's the top part:

/usr/include/boost/variant/detail/variant_io.hpp: In instantiation of ‘void boost::detail::variant::printer::operator()(const T&) const [with T = boost::logic::tribool; OStream = std::basic_ostream]’:
/usr/include/boost/variant/variant.hpp:1028:24: required from ‘typename boost::disable_if_c<(MoveSemantics && boost::is_same<Value2, Value2>::value), typename Visitor::result_type>::type boost::detail::variant::invoke_visitor<Visitor, MoveSemantics>::internal_visit(T&&, int) [with T = const boost::logic::tribool&; Visitor = boost::detail::variant::printer<std::basic_ostream >; bool MoveSemantics = false; typename boost::disable_if_c<(MoveSemantics && boost::is_same<Value2, Value2>::value), typename Visitor::result_type>::type = void]’
/usr/include/boost/variant/detail/visitation_impl.hpp:110:34: required from ‘typename Visitor::result_type boost::detail::variant::visitation_impl_invoke_impl(int, Visitor&, VoidPtrCV, T*, mpl_::true_) [with Visitor = boost::detail::variant::invoke_visitor<boost::detail::variant::printer<std::basic_ostream >, false>; VoidPtrCV = const void*; T = boost::logic::tribool; typename Visitor::result_type = void; mpl_::true_ = mpl_::bool_]’
/usr/include/boost/variant/detail/visitation_impl.hpp:150:41: required from ‘typename Visitor::result_type boost::detail::variant::visitation_impl_invoke(int, Visitor&, VoidPtrCV, T*, NoBackupFlag, int) [with Visitor = boost::detail::variant::invoke_visitor<boost::detail::variant::printer<std::basic_ostream >, false>; VoidPtrCV = const void*; T = boost::logic::tribool; NoBackupFlag = boost::variant<boost::logic::tribool, long int, rphp::CowPtr<__gmp_expr<_mpz_struct [1], mpz_struct [1]> >, rphp::CowPtr<gmp_expr<mpf_struct [1], mpf_struct [1]> >, std::cxx11::basic_string<char, std::char_traits, std::allocator >, rphp::pUStringP, rphp::CowPtrrphp::pHash, boost::shared_ptrrphp::pObject, boost::shared_ptrrphp::pResource, boost::shared_ptrrphp::pVar >::has_fallback_type; typename Visitor::result_type = void]’
/usr/include/boost/variant/detail/visitation_impl.hpp:231:5: required from ‘typename Visitor::result_type boost::detail::variant::visitation_impl(int, int, Visitor&, VoidPtrCV, mpl
::false
, NoBackupFlag, Which*, step0*) [with Which = mpl
::int
<0>; step0 = boost::detail::variant::visitation_impl_step<boost::mpl::l_iter<boost::mpl::l_item<mpl
::long
<10>, boost::logic::tribool, boost::mpl::l_item<mpl
::long
<9>, long int, boost::mpl::l_item<mpl
::long
<8>, rphp::CowPtr<gmp_expr<mpz_struct [1], mpz_struct [1]> >, boost::mpl::l_item<mpl::long<7>, rphp::CowPtr<gmp_expr<mpf_struct [1], mpf_struct [1]> >, boost::mpl::l_item<mpl::long<6>, std::cxx11::basic_string, boost::mpl::l_item<mpl::long<5>, rphp::pUStringP, boost::mpl::l_item<mpl::long<4>, rphp::CowPtrrphp::pHash, boost::mpl::l_item<mpl::long<3>, boost::shared_ptrrphp::pObject, boost::mpl::l_item<mpl::long<2>, boost::shared_ptrrphp::pResource, boost::mpl::l_item<mpl::long<1>, boost::shared_ptrrphp::pVar, boost::mpl::l_end> > > > > > > > > > >, boost::mpl::l_iterboost::mpl::l_end >; Visitor = boost::detail::variant::invoke_visitor<boost::detail::variant::printer<std::basic_ostream >, false>; VoidPtrCV = const void*; NoBackupFlag = boost::variant<boost::logic::tribool, long int, rphp::CowPtr<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >, rphp::CowPtr<__gmp_expr<mpf_struct [1], mpf_struct [1]> >, std::cxx11::basic_string<char, std::char_traits, std::allocator >, rphp::pUStringP, rphp::CowPtrrphp::pHash, boost::shared_ptrrphp::pObject, boost::shared_ptrrphp::pResource, boost::shared_ptrrphp::pVar >::has_fallback_type; typename Visitor::result_type = void; mpl::false = mpl::bool]’
/usr/include/boost/variant/variant.hpp:2334:48: required from ‘static typename Visitor::result_type boost::variant<T0, TN>::internal_apply_visitor_impl(int, int, Visitor&, VoidPtrCV) [with Visitor = boost::detail::variant::invoke_visitor<boost::detail::variant::printer<std::basic_ostream >, false>; VoidPtrCV = const void*; T0 = boost::logic::tribool; TN = {long int, rphp::CowPtr<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >, rphp::CowPtr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]> >, std::_cxx11::basic_string<char, std::char_traits, std::allocator >, rphp::pUStringP, rphp::CowPtrrphp::pHash, boost::shared_ptrrphp::pObject, boost::shared_ptrrphp::pResource, boost::shared_ptrrphp::pVar}; typename Visitor::result_type = void]’
/usr/include/boost/variant/variant.hpp:2355:43: required from ‘typename Visitor::result_type boost::variant<T0, TN>::internal_apply_visitor(Visitor&) const [with Visitor = boost::detail::variant::invoke_visitor<boost::detail::variant::printer<std::basic_ostream >, false>; T0
= boost::logic::tribool; TN = {long int, rphp::CowPtr<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >, rphp::CowPtr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]> >, std::_cxx11::basic_string<char, std::char_traits, std::allocator >, rphp::pUStringP, rphp::CowPtrrphp::pHash, boost::shared_ptrrphp::pObject, boost::shared_ptrrphp::pResource, boost::shared_ptrrphp::pVar}; typename Visitor::result_type = void]’
/usr/include/boost/variant/variant.hpp:2401:44: required from ‘typename Visitor::result_type boost::variant<T0, TN>::apply_visitor(Visitor&) const & [with Visitor = boost::detail::variant::printer<std::basic_ostream >; T0
= boost::logic::tribool; TN = {long int, rphp::CowPtr<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >, rphp::CowPtr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]> >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, rphp::pUStringP, rphp::CowPtrrphp::pHash, boost::shared_ptrrphp::pObject, boost::shared_ptrrphp::pResource, boost::shared_ptrrphp::pVar}; typename Visitor::result_type = void]’
/usr/include/boost/variant/detail/variant_io.hpp:88:22: required from ‘std::basic_ostream<_CharT, _Traits>& boost::operator<<(std::basic_ostream<_CharT, _Traits>&, const boost::variant<U0, UN ...>&) [with E = char; T = std::char_traits; U0 = boost::logic::tribool; UN = {long int, rphp::CowPtr<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >, rphp::CowPtr<__gmp_expr<__mpf_struct [1], __mpf_struct [1]> >, std::_cxx11::basic_string<char, std::char_traits, std::allocator >, rphp::pUStringP, rphp::CowPtrrphp::pHash, boost::shared_ptrrphp::pObject, boost::shared_ptrrphp::pResource, boost::shared_ptrrphp::pVar}]’
/code/contribs/roadsend-php-raven/runtime/pVar.cpp:201:20: required from here
/usr/include/boost/variant/detail/variant_io.hpp:64:14: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream’ and ‘const boost::logic::tribool’)
64 | out
<< operand;
| ~~~~~^~~~~~~~~~
/usr/include/boost/variant/detail/variant_io.hpp:64:14: note: candidate: ‘operator<<(int, int)’ (built-in)
/usr/include/boost/variant/detail/variant_io.hpp:64:14: note: no known conversion for argument 2 from ‘const boost::logic::tribool’ to ‘int’
In file included from /usr/include/boost/range/iterator_range_io.hpp:32,
from /usr/include/boost/range/iterator_range.hpp:14,
from /code/contribs/roadsend-php-raven/include/rphp/pSourceTypes.h:28,
from /code/contribs/roadsend-php-raven/include/rphp/runtime/pRuntimeTypes.h:25,
from /code/contribs/roadsend-php-raven/include/rphp/runtime/pVar.h:24,
from /code/contribs/roadsend-php-raven/runtime/pVar.cpp:22:
/usr/include/c++/10.2.0/ostream:108:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& ()(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream]’
108 | operator<<(__ostream_type& (
__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/10.2.0/ostream:108:36: note: no known conversion for argument 1 from ‘const boost::logic::tribool’ to ‘std::basic_ostream::__ostream_type& ()(std::basic_ostream::__ostream_type&)’ {aka ‘std::basic_ostream& ()(std::basic_ostream&)’}
108 | operator<<(__ostream_type& (__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10.2.0/ostream:117:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type& (
)(std::basic_ostream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream; std::basic_ostream<_CharT, _Traits>::__ios_type = std::basic_ios]’
117 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant