Thanks for the reply, John.  I think for now I will simply use the .str() method for mpfr_float, since my policies for printing numbers need the entire number (or really, some portion of the number which is known at runtime, but not necessarily at compile time).  

Any help from the Boost.Spirit people on connecting Boost.Multiprecision variable-precision types would be swell.  I am happy to help with this.  I already use Spirit.Qi for parsing, and love it, so really want to be able to use Karma in full, as well.

Thanks,
Daniel

 

---------- Forwarded message ----------
From: John Maddock <jz.maddock@googlemail.com>
To: boost-users@lists.boost.org
Cc: 
Date: Wed, 3 Aug 2016 18:14:05 +0100
Subject: Re: [Boost-users] [spirit][karma] multiprecision modf

Here's the new error message:

In file included from test/generating/mpfr_float.cpp:27:
In file included from ./include/bertini2/io/generators.hpp:44:
In file included from /usr/local/include/boost/spirit/include/karma.hpp:16:
In file included from /usr/local/include/boost/spirit/home/karma.hpp:15:
In file included from /usr/local/include/boost/spirit/home/karma/numeric.hpp:16:
In file included from /usr/local/include/boost/spirit/home/karma/numeric/real.hpp:32:
/usr/local/include/boost/spirit/home/karma/numeric/real_policies.hpp:263:39: error: incompatible operand types ('int' and 'typename
enable_if_c<number_category<detail::expression<function, log10_funct<mpfr_float_backend<0, allocate_dynamic> >, number<mpfr_float_backend<0,
      allocate_dynamic>, boost::multiprecision::expression_template_option::et_on>, void, void> >::value == number_kind_floating_point,
      detail::expression<detail::function, detail::floor_funct<typename detail::backend_type<detail::expression<function,
      log10_funct<mpfr_float_backend<0, allocate_dynamic> >, number<mpfr_float_backend<0, allocate_dynamic>,
boost::multiprecision::expression_template_option::et_on>, void, void> >::type>, detail::expression<function, log10_funct<mpfr_float_backend<0,
      allocate_dynamic> >, number<mpfr_float_backend<0, allocate_dynamic>, boost::multiprecision::expression_template_option::et_on>, void, void> >
      >::type' (aka 'boost::multiprecision::detail::expression<boost::multiprecision::detail::function,
boost::multiprecision::detail::floor_funct<boost::multiprecision::backends::mpfr_float_backend<0, allocate_dynamic> >,
boost::multiprecision::detail::expression<boost::multiprecision::detail::function,
boost::multiprecision::detail::log10_funct<boost::multiprecision::backends::mpfr_float_backend<0, allocate_dynamic> >,
boost::multiprecision::number<boost::multiprecision::backends::mpfr_float_backend<0, allocate_dynamic>,
boost::multiprecision::expression_template_option::et_on>, void, void>, void, void>'))
                (traits::test_zero(n) ? 0 : floor(log10(n))) + 1;

I'm afraid that code is incompatible with expression templates: the two halves of the conditional expression have different/unrelated types which aren't convertible to each other.  An explicit cast is needed here to make the code expression-template compatible.  Or else use a number type with expression templates turned off. Suggest you contact the spirit developers (they have their own mailing list I believe) and see what their intent is here.

As a last question, I am unsure about the use of the a function parameter in my specialization BertiniNumPolicy<mpfr_float>, particularly the precision(mpfr_float) function.  In the documentation and examples I have seen for specializations, this function doesn't use the argument.  Is it ok that it does, that it checks the actual precision of x??? See above code.  An alternate method for me might be to just use the str() method provided by the number<...> from Multiprecision, but it seems like since this type is numeric, I'd like to be able to generate using the numeric generators from Karma.

That looks to be the intent yes.  Note however, that it's a conceptual requirement of karma that the number have numeric_limits specialized - that's not true for type mpfr_float since most of the fields would have to vary at runtime which isn't possible for numeric_limits.  Technically we could provide a specialization that defines the members that are constant and leaves the others as undefined/zero/infinity, but it's not clear what's the right thing to do here - numeric_limits wasn't designed for this kind of type it seems :(

I'm changing the subject line to include spirit/karma in hopes that their developers will see this and chip in.... we should really find a way to make the libraries work better together.

HTH, John.



---------- Forwarded message ----------
From: Gavin Lambert <gavinl@compacsort.com>
To: boost-users@lists.boost.org
Cc: 
Date: Thu, 4 Aug 2016 16:05:12 +1200
Subject: Re: [Boost-users] boost::serialization::array for Orocos RTT
On 3/08/2016 23:29, Sambeet Panigrahi wrote:
I gave the following includes
#include <boost/serialization/array.hpp>
#include <boost/array.hpp>

I know boost::array exists,but does boost::serialization::array
exist?Because in the namespace serialization in the
boost/serialization/array.hpp, I could not find such a template.

namespace boost { namespace serialization {
[...]
template<class T>
class array_wrapper :
    public wrapper_traits<const array_wrapper< T > >

Looks like it's called array_wrapper instead of array in your version.

Which is odd, since you claimed to be using 1.44, and these say differently:

  http://www.boost.org/doc/libs/1_44_0/boost/serialization/array.hpp


https://github.com/boostorg/serialization/blob/1b9dc31ba/include/boost/serialization/array.hpp

If you obtained the Boost library from an SDK vendor instead of directly from Boost, you should probably ask them why it is different.





---------- Forwarded message ----------
From: "deneme.true" <deneme.true@gmail.com>
To: boost-users@lists.boost.org
Cc: 
Date: Thu, 4 Aug 2016 10:40:22 +0300
Subject: [Boost-users] Serialization error
Hello,

I got following errors on 64 bit machine when I try to compile my application.

1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: __cdecl boost::archive::text_iarchive_impl<class
boost::archive::text_iarchive>::text_iarchive_impl<class
boost::archive::text_iarchive>(class std::basic_istream<char,struct
std::char_traits<char> > &,unsigned int)"
(??0?$text_iarchive_impl@Vtext_iarchive@archive@boost@@@archive@boost@@IEAA@AEAV?$basic_istream@DU?$char_traits@D@std@@@std@@I@Z)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: void __cdecl boost::archive::text_iarchive_impl<class
boost::archive::text_iarchive>::load_override(struct
boost::archive::class_name_type &)"
(?load_override@?$text_iarchive_impl@Vtext_iarchive@archive@boost@@@archive@boost@@IEAAXAEAUclass_name_type@23@@Z)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: void __cdecl boost::archive::text_iarchive_impl<class
boost::archive::text_iarchive>::load(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > &)"
(?load@?$text_iarchive_impl@Vtext_iarchive@archive@boost@@@archive@boost@@IEAAXAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: __cdecl boost::archive::basic_text_iprimitive<class
std::basic_istream<char,struct std::char_traits<char> >
>::~basic_text_iprimitive<class std::basic_istream<char,struct
std::char_traits<char> > >(void)"
(??1?$basic_text_iprimitive@V?$basic_istream@DU?$char_traits@D@std@@@std@@@archive@boost@@IEAA@XZ)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: __cdecl boost::archive::basic_text_oprimitive<class
std::basic_ostream<char,struct std::char_traits<char> >
>::~basic_text_oprimitive<class std::basic_ostream<char,struct
std::char_traits<char> > >(void)"
(??1?$basic_text_oprimitive@V?$basic_ostream@DU?$char_traits@D@std@@@std@@@archive@boost@@IEAA@XZ)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: __cdecl boost::archive::text_oarchive_impl<class
boost::archive::text_oarchive>::text_oarchive_impl<class
boost::archive::text_oarchive>(class std::basic_ostream<char,struct
std::char_traits<char> > &,unsigned int)"
(??0?$text_oarchive_impl@Vtext_oarchive@archive@boost@@@archive@boost@@IEAA@AEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@I@Z)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: void __cdecl boost::archive::text_oarchive_impl<class
boost::archive::text_oarchive>::save(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &)"
(?save@?$text_oarchive_impl@Vtext_oarchive@archive@boost@@@archive@boost@@IEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: virtual __cdecl
boost::archive::detail::basic_iserializer::~basic_iserializer(void)"
(??1basic_iserializer@detail@archive@boost@@MEAA@XZ)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: __cdecl
boost::archive::detail::basic_iserializer::basic_iserializer(class
boost::serialization::extended_type_info const &)"
(??0basic_iserializer@detail@archive@boost@@IEAA@AEBVextended_type_info@serialization@3@@Z)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: virtual __cdecl
boost::archive::detail::basic_oserializer::~basic_oserializer(void)"
(??1basic_oserializer@detail@archive@boost@@MEAA@XZ)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: __cdecl
boost::archive::detail::basic_oserializer::basic_oserializer(class
boost::serialization::extended_type_info const &)"
(??0basic_oserializer@detail@archive@boost@@IEAA@AEBVextended_type_info@serialization@3@@Z)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"public: void __cdecl
boost::archive::detail::basic_iarchive::reset_object_address(void
const *,void const *)"
(?reset_object_address@basic_iarchive@detail@archive@boost@@QEAAXPEBX0@Z)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"public: class boost::archive::library_version_type __cdecl
boost::archive::detail::basic_iarchive::get_library_version(void)const
" (?get_library_version@basic_iarchive@detail@archive@boost@@QEBA?AVlibrary_version_type@34@XZ)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"public: void __cdecl
boost::archive::detail::basic_iarchive::load_object(void *,class
boost::archive::detail::basic_iserializer const &)"
(?load_object@basic_iarchive@detail@archive@boost@@QEAAXPEAXAEBVbasic_iserializer@234@@Z)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"public: virtual __cdecl
boost::archive::detail::basic_iarchive::~basic_iarchive(void)"
(??1basic_iarchive@detail@archive@boost@@UEAA@XZ)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"public: void __cdecl
boost::archive::detail::basic_oarchive::end_preamble(void)"
(?end_preamble@basic_oarchive@detail@archive@boost@@QEAAXXZ)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"public: void __cdecl
boost::archive::detail::basic_oarchive::save_object(void const *,class
boost::archive::detail::basic_oserializer const &)"
(?save_object@basic_oarchive@detail@archive@boost@@QEAAXPEBXAEBVbasic_oserializer@234@@Z)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: virtual __cdecl
boost::archive::detail::basic_oarchive::~basic_oarchive(void)"
(??1basic_oarchive@detail@archive@boost@@MEAA@XZ)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: void __cdecl boost::archive::basic_text_oarchive<class
boost::archive::text_oarchive>::newtoken(void)"
(?newtoken@?$basic_text_oarchive@Vtext_oarchive@archive@boost@@@archive@boost@@IEAAXXZ)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"public: virtual __cdecl
boost::archive::archive_exception::~archive_exception(void)"
(??1archive_exception@archive@boost@@UEAA@XZ)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"public: __cdecl
boost::archive::archive_exception::archive_exception(enum
boost::archive::archive_exception::_exception_code,char const *,char
const *)" (??0archive_exception@archive@boost@@QEAA@W4_exception_code@012@PEBD1@Z)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"public: __cdecl
boost::archive::archive_exception::archive_exception(class
boost::archive::archive_exception const &)"
(??0archive_exception@archive@boost@@QEAA@AEBV012@@Z)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"public: virtual bool __cdecl
boost::serialization::typeid_system::extended_type_info_typeid_0::is_equal(class
boost::serialization::extended_type_info const &)const "
(?is_equal@extended_type_info_typeid_0@typeid_system@serialization@boost@@UEBA_NAEBVextended_type_info@34@@Z)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"public: virtual bool __cdecl
boost::serialization::typeid_system::extended_type_info_typeid_0::is_less_than(class
boost::serialization::extended_type_info const &)const "
(?is_less_than@extended_type_info_typeid_0@typeid_system@serialization@boost@@UEBA_NAEBVextended_type_info@34@@Z)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: void __cdecl
boost::serialization::typeid_system::extended_type_info_typeid_0::type_unregister(void)"
(?type_unregister@extended_type_info_typeid_0@typeid_system@serialization@boost@@IEAAXXZ)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: void __cdecl
boost::serialization::typeid_system::extended_type_info_typeid_0::type_register(class
type_info const &)"
(?type_register@extended_type_info_typeid_0@typeid_system@serialization@boost@@IEAAXAEBVtype_info@@@Z)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: virtual __cdecl
boost::serialization::typeid_system::extended_type_info_typeid_0::~extended_type_info_typeid_0(void)"
(??1extended_type_info_typeid_0@typeid_system@serialization@boost@@MEAA@XZ)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: __cdecl
boost::serialization::typeid_system::extended_type_info_typeid_0::extended_type_info_typeid_0(char
const *)" (??0extended_type_info_typeid_0@typeid_system@serialization@boost@@IEAA@PEBD@Z)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: void __cdecl
boost::serialization::extended_type_info::key_register(void)const "
(?key_register@extended_type_info@serialization@boost@@IEBAXXZ)
1>wxRememberme.obj : error LNK2001: unresolved external symbol
"protected: void __cdecl
boost::serialization::extended_type_info::key_unregister(void)const "
(?key_unregister@extended_type_info@serialization@boost@@IEBAXXZ)
1>libeay32mt.lib(txt_db.obj) : error LNK2001: unresolved external
symbol __iob_func
1>libeay32mt.lib(ui_openssl.obj) : error LNK2001: unresolved external
symbol __iob_func
1>ssleay32mt.lib(s3_srvr.obj) : error LNK2001: unresolved external
symbol __iob_func
1>ssleay32mt.lib(t1_enc.obj) : error LNK2001: unresolved external
symbol __iob_func
1>ssleay32mt.lib(d1_both.obj) : error LNK2001: unresolved external
symbol __iob_func
1>libeay32mt.lib(cryptlib.obj) : error LNK2001: unresolved external
symbol __iob_func
1>libeay32mt.lib(pem_lib.obj) : error LNK2001: unresolved external
symbol __iob_func
1>libeay32mt.lib(e_capi.obj) : error LNK2001: unresolved external
symbol __iob_func
1>libeay32mt.lib(gost_eng.obj) : error LNK2001: unresolved external
symbol __iob_func
1>libeay32mt.lib(cryptlib.obj) : error LNK2001: unresolved external
symbol _vsnwprintf

My boost library compile parameter is:

C:\boost_1_61_0>b2 install --prefix=C:\Boost1_61_0 address-model=64 --build-dir=
C:\boost-build toolset=msvc-14.0 variant=debug,release link=static threading=mul
ti runtime-link=static stage

I am using serialization.

Thanks in advance


_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users