Skip to content

Commit

Permalink
fix: resolve remaining build failures
Browse files Browse the repository at this point in the history
  • Loading branch information
joshessman-llnl committed Oct 14, 2021
1 parent 6f65384 commit 9e3efc8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/fmt/compile.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ struct is_compiled_string : std::is_base_of<compiled_string, S> {};
std::string s = fmt::format(FMT_COMPILE("{}"), 42);
\endrst
*/
#ifdef __cpp_if_constexpr
#if defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction)
# define FMT_COMPILE(s) \
FMT_STRING_IMPL(s, fmt::detail::compiled_string, explicit)
#else
Expand Down Expand Up @@ -535,7 +535,7 @@ constexpr auto compile(S format_str) {

FMT_MODULE_EXPORT_BEGIN

#ifdef __cpp_if_constexpr
#if defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction)

template <typename CompiledFormat, typename... Args,
typename Char = typename CompiledFormat::char_type,
Expand Down
7 changes: 7 additions & 0 deletions include/fmt/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,13 @@ struct ostream_params {
: ostream_params(params...) {
this->buffer_size = bs.value;
}

// Intel has a bug that results in failure to deduce a constructor
// for empty parameter packs
#if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 2000
ostream_params(int new_oflag) : oflag(new_oflag) {}
ostream_params(detail::buffer_size bs) : buffer_size(bs.value) {}
#endif
};

FMT_END_DETAIL_NAMESPACE
Expand Down
2 changes: 1 addition & 1 deletion test/compile-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ TEST(compile_test, compile_type_with_get) {
EXPECT_EQ("42", fmt::format(FMT_COMPILE("{}"), type_with_get()));
}

#ifdef __cpp_if_constexpr
#if defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction)
struct test_formattable {};

FMT_BEGIN_NAMESPACE
Expand Down

0 comments on commit 9e3efc8

Please sign in to comment.