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
58d2ca07
Verified
Commit
58d2ca07
authored
Jan 14, 2020
by
Justin Carpentier
Browse files
math/multiprecision: fix boost issue for old versions
parent
1ca196ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/math/multiprecision.hpp
View file @
58d2ca07
...
...
@@ -30,6 +30,21 @@ 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
...
...
@@ -39,11 +54,11 @@ 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
::
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
;
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
;
enum
{
IsComplex
=
boost
::
multiprecision
::
number_category
<
self_type
>::
value
==
boost
::
multiprecision
::
number_kind_complex
,
...
...
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