Skip to content

Commit

Permalink
Work-around for nvcc
Browse files Browse the repository at this point in the history
The nvcc compiler (at least up to 9.2) defines `__SIZEOF_INT128__`, but doesn't support 128-bit integers on device code:
```
error: "fmt::v6::format_arg_store<fmt::v6::basic_format_context<std::back_insert_iterator<fmt::v6::internal::buffer<char>>, char>, const char *, int, const char *>" contains a 128-bit integer, which is not supported in device code
```
  • Loading branch information
gsjaardema authored and vitaut committed Jan 15, 2020
1 parent 55b6130 commit 4bbe57c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ template <typename T> struct std_string_view {};

#ifdef FMT_USE_INT128
// Do nothing.
#elif defined(__SIZEOF_INT128__)
#elif defined(__SIZEOF_INT128__) && !FMT_NVCC
# define FMT_USE_INT128 1
using int128_t = __int128_t;
using uint128_t = __uint128_t;
Expand Down

0 comments on commit 4bbe57c

Please sign in to comment.