Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
pinocchio
Commits
7825e0d8
Verified
Commit
7825e0d8
authored
Jan 14, 2020
by
Justin Carpentier
Browse files
math/multiprecision: fix issue with older boost version
parent
58d2ca07
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/math/multiprecision.hpp
View file @
7825e0d8
...
...
@@ -30,21 +30,6 @@ namespace Eigen
#ifndef BOOST_MP_EIGEN_HPP
namespace
boost
{
namespace
multiprecision
{
namespace
fix
{
template
<
class
T
>
struct
scalar_result_from_possible_complex
{
typedef
typename
mpl
::
if_c
<
number_category
<
T
>::
value
==
number_kind_complex
,
typename
component_type
<
T
>::
type
,
T
>::
type
type
;
};
}
// namespace fix
}
// namespace multiprecision
}
// namespace boost
// Code adapted from <boost/multiprecision/eigen.hpp>
// Copyright 2018 John Maddock. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
...
...
@@ -54,14 +39,22 @@ namespace Eigen
template
<
class
Backend
,
boost
::
multiprecision
::
expression_template_option
ExpressionTemplates
>
struct
NumTraits
<
boost
::
multiprecision
::
number
<
Backend
,
ExpressionTemplates
>
>
{
typedef
boost
::
multiprecision
::
number
<
Backend
,
ExpressionTemplates
>
self_type
;
typedef
typename
boost
::
multiprecision
::
fix
::
scalar_result_from_possible_complex
<
self_type
>::
type
Real
;
typedef
self_type
NonInteger
;
// Not correct but we can't do much better??
typedef
double
Literal
;
typedef
self_type
Nested
;
typedef
boost
::
multiprecision
::
number
<
Backend
,
ExpressionTemplates
>
self_type
;
#if BOOST_VERSION / 100 % 1000 >= 68
typedef
typename
boost
::
multiprecision
::
scalar_result_from_possible_complex
<
self_type
>::
type
Real
;
#else
typedef
self_type
Real
;
#endif
typedef
self_type
NonInteger
;
// Not correct but we can't do much better??
typedef
double
Literal
;
typedef
self_type
Nested
;
enum
{
#if BOOST_VERSION / 100 % 1000 >= 68
IsComplex
=
boost
::
multiprecision
::
number_category
<
self_type
>::
value
==
boost
::
multiprecision
::
number_kind_complex
,
#else
IsComplex
=
0
#endif
IsInteger
=
boost
::
multiprecision
::
number_category
<
self_type
>::
value
==
boost
::
multiprecision
::
number_kind_integer
,
ReadCost
=
1
,
AddCost
=
4
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment