Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
798d09bb
Commit
798d09bb
authored
May 30, 2022
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debug ppc failure
parent
8c7cf513
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
include/fmt/format.h
include/fmt/format.h
+5
-2
test/format-impl-test.cc
test/format-impl-test.cc
+4
-3
No files found.
include/fmt/format.h
View file @
798d09bb
...
@@ -1314,10 +1314,13 @@ struct float_info<T, enable_if_t<std::numeric_limits<T>::digits == 64 ||
...
@@ -1314,10 +1314,13 @@ struct float_info<T, enable_if_t<std::numeric_limits<T>::digits == 64 ||
static const int exponent_bits = 15;
static const int exponent_bits = 15;
};
};
template <int> constexpr int check_digits();
// A double-double floating point number.
// A double-double floating point number.
template <typename T>
template <typename T>
struct
float_info
<
T
,
enable_if_t
<
std
::
numeric_limits
<
T
>::
digits
>=
106
&&
struct float_info<T, enable_if_t<!std::numeric_limits<T>::is_iec559 &&
!
std
::
numeric_limits
<
T
>::
is_iec559
>>
{
!is_float128<T>::value>> {
static constexpr int check = check_digits<std::numeric_limits<T>::digits>();
using carrier_uint = detail::uint128_t;
using carrier_uint = detail::uint128_t;
};
};
...
...
test/format-impl-test.cc
View file @
798d09bb
...
@@ -385,10 +385,11 @@ template <> struct numeric_limits<double_double> {
...
@@ -385,10 +385,11 @@ template <> struct numeric_limits<double_double> {
}
// namespace std
}
// namespace std
TEST
(
format_impl_test
,
write_double_double
)
{
TEST
(
format_impl_test
,
write_double_double
)
{
auto
s
=
std
::
string
();
// TODO: restore
fmt
::
detail
::
write
<
char
>
(
std
::
back_inserter
(
s
),
double_double
(
42
),
{});
// auto s = std::string();
// fmt::detail::write<char>(std::back_inserter(s), double_double(42), {});
#ifndef _MSC_VER // MSVC has an issue with specializing is_floating_point.
#ifndef _MSC_VER // MSVC has an issue with specializing is_floating_point.
EXPECT_EQ
(
s
,
"42"
);
//
EXPECT_EQ(s, "42");
#endif
#endif
}
}
...
...
Write
Preview
Markdown
is supported
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