Skip to content

Commit

Permalink
Fix missing includes in fmt.cc
Browse files Browse the repository at this point in the history
This causes duplicated std definitions in the fmt module
  • Loading branch information
yujincheng08 committed Jun 6, 2024
1 parent db9365a commit b0ebabd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#ifndef FMT_BASE_H_
#define FMT_BASE_H_

#include <limits.h> // CHAR_BIT
#include <stdio.h> // FILE
#include <string.h> // strlen
#include <climits> // CHAR_BIT
#include <cstdio> // FILE
#include <cstring> // strlen

#ifndef FMT_IMPORT_STD
// <cstddef> is also included transitively from <type_traits>.
Expand Down
5 changes: 5 additions & 0 deletions src/fmt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ module;
# include <algorithm>
# include <chrono>
# include <cmath>
# include <complex>
# include <cstddef>
# include <cstdint>
# include <cstdio>
# include <cstdlib>
# include <cstring>
# include <ctime>
# include <expected>
# include <exception>
# include <filesystem>
# include <fstream>
Expand All @@ -22,6 +24,7 @@ module;
# include <memory>
# include <optional>
# include <ostream>
# include <source_location>
# include <stdexcept>
# include <string>
# include <string_view>
Expand Down Expand Up @@ -104,7 +107,9 @@ extern "C++" {
#if FMT_OS
# include "fmt/os.h"
#endif
#include "fmt/ostream.h"
#include "fmt/printf.h"
#include "fmt/ranges.h"
#include "fmt/std.h"
#include "fmt/xchar.h"

Expand Down

0 comments on commit b0ebabd

Please sign in to comment.