Work around for a NVCC compiler bug
The NVCC compiler fails to compile the date library due
to a compiler bug which causes it to emit an error when
directly using std::ratio_{multiply,divide} in the template
instantiations for std::duration. This PR works around the
issue by introducing custom ratio_{multiply,divide} which
delegate to the standard library templates
This commit is contained in:
1 parent
3e376be2e9
commit
018a50bcd0
7 files changed
+33
-22
No files matched your search
@@ -72,8 +72,8 @@ main()
|
||||
using namespace date;
|
||||
using namespace std::chrono;
|
||||
|
||||
using decades = duration<int, std::ratio_multiply<std::ratio<10>, years::period>>;
|
||||
using decamonths = duration<int, std::ratio_multiply<std::ratio<10>, months::period>>;
|
||||
using decades = duration<int, date::detail::ratio_multiply<std::ratio<10>, years::period>>;
|
||||
using decamonths = duration<int, date::detail::ratio_multiply<std::ratio<10>, months::period>>;
|
||||
|
||||
constexpr months one_month{1};
|
||||
constexpr years one_year{1};
|
||||
|
||||
Reference in new issue
Block a user