Skip to content

Commit

Permalink
fmt: Add version 9.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jwillikers committed Jul 5, 2022
1 parent f9d317e commit b45bc2d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
6 changes: 6 additions & 0 deletions recipes/fmt/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ sources:
"8.1.1":
url: "https://github.com/fmtlib/fmt/archive/8.1.1.tar.gz"
sha256: "3d794d3cf67633b34b2771eb9f073bde87e846e0d395d254df7b211ef1ec7346"
"8.1.1":
url: "https://github.com/fmtlib/fmt/archive/8.1.1.tar.gz"
sha256: "3d794d3cf67633b34b2771eb9f073bde87e846e0d395d254df7b211ef1ec7346"
"9.0.0":
url: "https://github.com/fmtlib/fmt/archive/9.0.0.tar.gz"
sha256: "9a1e0e9e843a356d65c7604e2c8bf9402b50fe294c355de0095ebd42fb9bd2c5"
patches:
"5.3.0":
- patch_file: "patches/fix-install-5.3.0.patch"
Expand Down
15 changes: 10 additions & 5 deletions recipes/fmt/all/test_package/test_package.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#include <cstdlib>
#include <iostream>
#include <iterator>
#include <string>
#include <vector>
#include <limits>


#include "fmt/format.h"
#include "fmt/printf.h"
#include "fmt/ostream.h"
#include "fmt/color.h"
#include <fmt/format.h>
#include <fmt/printf.h>
#include <fmt/ostream.h>
#include <fmt/color.h>


void vreport(const char *format, fmt::format_args args) {
Expand All @@ -30,6 +31,10 @@ class Date {
}
};

#if FMT_VERSION >= 90000
template <> struct fmt::formatter<Date> : ostream_formatter {};
#endif

int main() {
const std::string thing("World");
fmt::print("PRINT: Hello {}!\n", thing);
Expand All @@ -39,7 +44,7 @@ int main() {
fmt::print("{}\n", formatted);

fmt::memory_buffer buf;
fmt::format_to(buf, "{}", 2.7182818);
fmt::format_to(std::begin(buf), "{}", 2.7182818);
fmt::print("Euler number: {}\n", fmt::to_string(buf));

const std::string date = fmt::format("The date is {}\n", Date(2012, 12, 9));
Expand Down
2 changes: 2 additions & 0 deletions recipes/fmt/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ versions:
folder: all
"8.1.1":
folder: all
"9.0.0":
folder: all

0 comments on commit b45bc2d

Please sign in to comment.