profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/vitaut/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Victor Zverovich vitaut Facebook Laniakea Supercluster http://zverovich.net 🤍❤️🤍 Carbon-based open sourcerer, author of @fmtlib and C++20 std::format

michaeljones/breathe 553

ReStructuredText and Sphinx bridge to Doxygen

vitaut/_._ 95

A simple streaming library

vitaut/iampl 14

AMPL magics for IPython

vitaut-archive/captain-nemo 10

An extension that converts Nautilus into a two-panel (orthodox) file manager.

vitaut/splib 8

A collection of stochastic programming problems

vitaut/neverhappen 5

Because some things should never happen

vitaut-archive/f90cache 3

Clone of f90cache

vitaut/modules 2

Experiments with C++ modules

pull request commentfmtlib/fmt

Add support for Bazel

Thank you

Vertexwahn

comment created time in an hour

push eventfmtlib/fmt

Vertexwahn

commit sha d9a731d4862891f274b63cef14bde0e5558a290f

Add basic support for Bazel (#2505)

view details

push time in an hour

PR merged fmtlib/fmt

Add support for Bazel

Goal of this PR

This PR helps users of the Bazel build system to integrate fmt into their builds.

Supporting two build systems (CMake and Bazel) is of course more effort to maintain but helps to spread fmt. In the worst case the Bazel build does simply not work - in the best case, someone who uses Bazel can benefit from it.

Also, other projects support CMake and Bazel side by side (e.g. Catch2, GoogleTest, OpenEXR, oneTBB etc.)

Demo

A Demo of how to use this can be found here.

Everything a user has to do is:

Create a WORKSPACE.bazel file with the following content:

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

# Fetch fmt
git_repository(
    name = "fmt",
    branch = "add-bazel-support",
    remote = "https://github.com/Vertexwahn/fmt",
)

Create a BUILD.bazel file and add a dependency to fmt:

cc_binary( # Build a binary
    name = "Demo", # Name of the Binary
    srcs = ["main.cpp"], # List of files - we only have main.cpp
    deps = ["@fmt//:fmt"], # Depend on fmt
)

Make use of fmt in main.cpp:

#include "fmt/core.h"

#include <iostream>

int main() {
    std::string message = fmt::format("The answer is {}.", 42);

    std::cout << message << std::endl;
    
    return 0;
}

Tested with: GCC 9.3.0, Clang12, MSVC 2019

Support

I am willing to support the Bazel build support of fmt for a half year - after this period I can reconsider doing it for another half year

+117 -0

5 comments

5 changed files

Vertexwahn

pr closed time in an hour

issue commentfmtlib/fmt

clang 13 C++20 consteval error

@kotori2, please open a new issue since it's unrelated to the current one.

englercj

comment created time in 3 hours

issue closedfmtlib/fmt

‘fmt::v8::detail::assert_fail(char const*, int, char const*)’undefined reference

hu@HU:~/Software/orthogonal-planes-master/build$ make Consolidate compiler generated dependencies of target ppf_lib [ 10%] Built target ppf_lib Consolidate compiler generated dependencies of target tinyply [ 21%] Built target tinyply Consolidate compiler generated dependencies of target vis_lib [ 42%] Built target vis_lib Consolidate compiler generated dependencies of target corner_lib [ 52%] Built target corner_lib Consolidate compiler generated dependencies of target graph_lib [ 78%] Built target graph_lib Consolidate compiler generated dependencies of target PLY_PPDetectRefine [ 84%] Linking CXX executable ../../ply_detect_refine/bin/PLY_PPDetectRefine ../libppf_lib.a(PairDetector.cpp.o):in ‘std::make_unsigned<int>::type fmt::v8::detail::to_unsigned<int>(int)’: PairDetector.cpp:(.text.ZN3fmt2v86detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4[ZN3fmt2v86detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4]+0x1b):对‘fmt::v8::detail::assert_fail(char const*, int, char const*)’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘fmt::v8::format_error::format_error(char const*)’中: PairDetector.cpp:(.text._ZN3fmt2v812format_errorC2EPKc[_ZN3fmt2v812format_errorC5EPKc]+0x24):对‘vtable for fmt::v8::format_error’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘fmt::v8::detail::throw_format_error(char const*)’中: PairDetector.cpp:(.text._ZN3fmt2v86detail18throw_format_errorEPKc[_ZN3fmt2v86detail18throw_format_errorEPKc]+0x23):对‘fmt::v8::format_error::~format_error()’undefined reference PairDetector.cpp:(.text._ZN3fmt2v86detail18throw_format_errorEPKc[_ZN3fmt2v86detail18throw_format_errorEPKc]+0x28):对‘typeinfo for fmt::v8::format_error’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘std::make_unsigned<long>::type fmt::v8::detail::to_unsigned<long>(long)’中: PairDetector.cpp:(.text.ZN3fmt2v86detail11to_unsignedIlEENSt13make_unsignedIT_E4typeES4[ZN3fmt2v86detail11to_unsignedIlEENSt13make_unsignedIT_E4typeES4]+0x1d):对‘fmt::v8::detail::assert_fail(char const*, int, char const*)’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘Sophus::SO3Base<Sophus::SO3<double, 0> >::normalize()’中: PairDetector.cpp:(.text._ZN6Sophus7SO3BaseINS_3SO3IdLi0EEEE9normalizeEv[_ZN6Sophus7SO3BaseINS_3SO3IdLi0EEEE9normalizeEv]+0x121):对‘fmt::v8::vprint(fmt::v8::basic_string_view<char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<fmt::v8::appender, char> >)’undefined reference PairDetector.cpp:(.text._ZN6Sophus7SO3BaseINS_3SO3IdLi0EEEE9normalizeEv[_ZN6Sophus7SO3BaseINS_3SO3IdLi0EEEE9normalizeEv]+0x191):对‘fmt::v8::vprint(fmt::v8::basic_string_view<char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<fmt::v8::appender, char> >)’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘fmt::v8::basic_format_parse_context<char, fmt::v8::detail::error_handler>::on_error(char const*)’中: PairDetector.cpp:(.text._ZN3fmt2v826basic_format_parse_contextIcNS0_6detail13error_handlerEE8on_errorEPKc[_ZN3fmt2v826basic_format_parse_contextIcNS0_6detail13error_handlerEE8on_errorEPKc]+0x5):对‘fmt::v8::detail::error_handler::on_error(char const*)’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘void fmt::v8::detail::format_value<char, Eigen::Transpose<Eigen::Matrix<double, 4, 1, 0, 4, 1> > >(fmt::v8::detail::buffer<char>&, Eigen::Transpose<Eigen::Matrix<double, 4, 1, 0, 4, 1> > const&, fmt::v8::detail::locale_ref)’中: PairDetector.cpp:(.text._ZN3fmt2v86detail12format_valueIcN5Eigen9TransposeINS3_6MatrixIdLi4ELi1ELi0ELi4ELi1EEEEEEEvRNS1_6bufferIT_EERKT0_NS1_10locale_refE[_ZN3fmt2v86detail12format_valueIcN5Eigen9TransposeINS3_6MatrixIdLi4ELi1ELi0ELi4ELi1EEEEEEEvRNS1_6bufferIT_EERKT0_NS1_10locale_refE]+0x72):对‘std::locale fmt::v8::detail::locale_ref::getstd::locale() const’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘char const* fmt::v8::detail::parse_align<char, fmt::v8::detail::specs_checker<fmt::v8::detail::dynamic_specs_handler<fmt::v8::basic_format_parse_context<char, fmt::v8::detail::error_handler> > >&>(char const*, char const*, fmt::v8::detail::specs_checker<fmt::v8::detail::dynamic_specs_handler<fmt::v8::basic_format_parse_context<char, fmt::v8::detail::error_handler> > >&)’中: PairDetector.cpp:(.text.ZN3fmt2v86detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0[ZN3fmt2v86detail11parse_alignIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0]+0x66):对‘fmt::v8::detail::assert_fail(char const*, int, char const*)’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘int fmt::v8::detail::parse_nonnegative_int<char>(char const*&, char const*, int)’中: PairDetector.cpp:(.text._ZN3fmt2v86detail21parse_nonnegative_intIcEEiRPKT_S5_i[_ZN3fmt2v86detail21parse_nonnegative_intIcEEiRPKT_S5_i]+0x73):对‘fmt::v8::detail::assert_fail(char const*, int, char const*)’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘char const* fmt::v8::detail::parse_width<char, fmt::v8::detail::specs_checker<fmt::v8::detail::dynamic_specs_handler<fmt::v8::basic_format_parse_context<char, fmt::v8::detail::error_handler> > >&>(char const*, char const*, fmt::v8::detail::specs_checker<fmt::v8::detail::dynamic_specs_handler<fmt::v8::basic_format_parse_context<char, fmt::v8::detail::error_handler> > >&)’中: PairDetector.cpp:(.text.ZN3fmt2v86detail11parse_widthIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0[ZN3fmt2v86detail11parse_widthIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SD_SD_OT0]+0x48):对‘fmt::v8::detail::assert_fail(char const*, int, char const*)’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘void fmt::v8::detail::check_string_type_spec<char, fmt::v8::detail::error_handler&>(char, fmt::v8::detail::error_handler&)’中: PairDetector.cpp:(.text.ZN3fmt2v86detail22check_string_type_specIcRNS1_13error_handlerEEEvT_OT0[ZN3fmt2v86detail22check_string_type_specIcRNS1_13error_handlerEEEvT_OT0]+0x22):对‘fmt::v8::detail::error_handler::on_error(char const*)’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘int fmt::v8::detail::get_dynamic_spec<fmt::v8::detail::width_checker, fmt::v8::basic_format_arg<fmt::v8::basic_format_context<fmt::v8::appender, char> >, fmt::v8::detail::error_handler>(fmt::v8::basic_format_arg<fmt::v8::basic_format_context<fmt::v8::appender, char> >, fmt::v8::detail::error_handler)’中: PairDetector.cpp:(.text.ZN3fmt2v86detail16get_dynamic_specINS1_13width_checkerENS0_16basic_format_argINS0_20basic_format_contextINS0_8appenderEcEEEENS1_13error_handlerEEEiT0_T1[ZN3fmt2v86detail16get_dynamic_specINS1_13width_checkerENS0_16basic_format_argINS0_20basic_format_contextINS0_8appenderEcEEEENS1_13error_handlerEEEiT0_T1]+0x245):对‘fmt::v8::detail::error_handler::on_error(char const*)’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘int fmt::v8::detail::get_dynamic_spec<fmt::v8::detail::precision_checker, fmt::v8::basic_format_arg<fmt::v8::basic_format_context<fmt::v8::appender, char> >, fmt::v8::detail::error_handler>(fmt::v8::basic_format_arg<fmt::v8::basic_format_context<fmt::v8::appender, char> >, fmt::v8::detail::error_handler)’中: PairDetector.cpp:(.text.ZN3fmt2v86detail16get_dynamic_specINS1_17precision_checkerENS0_16basic_format_argINS0_20basic_format_contextINS0_8appenderEcEEEENS1_13error_handlerEEEiT0_T1[ZN3fmt2v86detail16get_dynamic_specINS1_17precision_checkerENS0_16basic_format_argINS0_20basic_format_contextINS0_8appenderEcEEEENS1_13error_handlerEEEiT0_T1]+0x245):对‘fmt::v8::detail::error_handler::on_error(char const*)’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘void fmt::v8::detail::check_string_type_spec<char, fmt::v8::detail::error_handler>(char, fmt::v8::detail::error_handler&&)’中: PairDetector.cpp:(.text.ZN3fmt2v86detail22check_string_type_specIcNS1_13error_handlerEEEvT_OT0[ZN3fmt2v86detail22check_string_type_specIcNS1_13error_handlerEEEvT_OT0]+0x22):对‘fmt::v8::detail::error_handler::on_error(char const*)’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘char const* fmt::v8::detail::do_parse_arg_id<char, char const* fmt::v8::detail::parse_width<char, fmt::v8::detail::specs_checker<fmt::v8::detail::dynamic_specs_handler<fmt::v8::basic_format_parse_context<char, fmt::v8::detail::error_handler> > >&>(char const*, char const*, fmt::v8::detail::specs_checker<fmt::v8::detail::dynamic_specs_handler<fmt::v8::basic_format_parse_context<char, fmt::v8::detail::error_handler> > >&)::width_adapter&>(char const*, char const*, fmt::v8::detail::specs_checker<fmt::v8::detail::dynamic_specs_handler<fmt::v8::basic_format_parse_context<char, fmt::v8::detail::error_handler> > >&)’中: PairDetector.cpp:(.text.ZN3fmt2v86detail15do_parse_arg_idIcRZNS1_11parse_widthIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SE_SE_OT0_E13width_adapterEESE_SE_SE_SG[ZN3fmt2v86detail15do_parse_arg_idIcRZNS1_11parse_widthIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SE_SE_OT0_E13width_adapterEESE_SE_SE_SG]+0xba):对‘fmt::v8::detail::assert_fail(char const*, int, char const*)’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘char const* fmt::v8::detail::do_parse_arg_id<char, char const* fmt::v8::detail::parse_precision<char, fmt::v8::detail::specs_checker<fmt::v8::detail::dynamic_specs_handler<fmt::v8::basic_format_parse_context<char, fmt::v8::detail::error_handler> > >&>(char const*, char const*, fmt::v8::detail::specs_checker<fmt::v8::detail::dynamic_specs_handler<fmt::v8::basic_format_parse_context<char, fmt::v8::detail::error_handler> > >&)::precision_adapter&>(char const*, char const*, fmt::v8::detail::specs_checker<fmt::v8::detail::dynamic_specs_handler<fmt::v8::basic_format_parse_context<char, fmt::v8::detail::error_handler> > >&)’中: PairDetector.cpp:(.text.ZN3fmt2v86detail15do_parse_arg_idIcRZNS1_15parse_precisionIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SE_SE_OT0_E17precision_adapterEESE_SE_SE_SG[ZN3fmt2v86detail15do_parse_arg_idIcRZNS1_15parse_precisionIcRNS1_13specs_checkerINS1_21dynamic_specs_handlerINS0_26basic_format_parse_contextIcNS1_13error_handlerEEEEEEEEEPKT_SE_SE_OT0_E17precision_adapterEESE_SE_SE_SG]+0xba):对‘fmt::v8::detail::assert_fail(char const*, int, char const*)’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘unsigned long long fmt::v8::detail::width_checkerfmt::v8::detail::error_handler::operator()<int, 0>(int)’中: PairDetector.cpp:(.text.ZN3fmt2v86detail13width_checkerINS1_13error_handlerEEclIiLi0EEEyT[ZN3fmt2v86detail13width_checkerINS1_13error_handlerEEclIiLi0EEEyT]+0x2d):对‘fmt::v8::detail::error_handler::on_error(char const*)’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘unsigned long long fmt::v8::detail::width_checkerfmt::v8::detail::error_handler::operator()<unsigned int, 0>(unsigned int)’中: PairDetector.cpp:(.text.ZN3fmt2v86detail13width_checkerINS1_13error_handlerEEclIjLi0EEEyT[ZN3fmt2v86detail13width_checkerINS1_13error_handlerEEclIjLi0EEEyT]+0x2d):对‘fmt::v8::detail::error_handler::on_error(char const*)’undefined reference ../libppf_lib.a(PairDetector.cpp.o):在函数‘unsigned long long ply_detect_refine/CMakeFiles/PLY_PPDetectRefine.dir/build.make:137: recipe for target '../ply_detect_refine/bin/PLY_PPDetectRefine' failed make[2]: *** [../ply_detect_refine/bin/PLY_PPDetectRefine] Error 1 CMakeFiles/Makefile2:258: recipe for target 'ply_detect_refine/CMakeFiles/PLY_PPDetectRefine.dir/all' failed make[1]: *** [ply_detect_refine/CMakeFiles/PLY_PPDetectRefine.dir/all] Error 2 Makefile:90: recipe for target 'all' failed make: *** [all] Error 2

closed time in 5 hours

HU-517

issue commentfmtlib/fmt

‘fmt::v8::detail::assert_fail(char const*, int, char const*)’undefined reference

Closing for now but feel free to reopen with a self-contained repro.

HU-517

comment created time in 5 hours

issue commentfmtlib/fmt

Request: add a default formatter for std::chrono::zoned_time

Sounds reasonable, a PR is welcome!

LamboPita

comment created time in 6 hours

push eventfmtlib/fmtlib.github.io

Victor Zverovich

commit sha de3624003d4f8cbd21c01d3b6f7cc9b5b00398dc

d -> p

view details

push time in 6 hours

issue commentfmtlib/fmt

Is there a specific reason to not constexprify Dragonbox?

I don't have much to add to what @alexezeder wrote. I think Dragon4 is OK for now but if it proves to be slow in terms of compile time affecting real use cases we could look into ways to optimize it in the future, possibly by constexprifying Dragonbox.

jk-jeon

comment created time in 7 hours

issue closedfmtlib/fmt

Is there a specific reason to not constexprify Dragonbox?

Is there a specific reason to not constexprify Dragonbox? If not, I believe it should be not terribly difficult to do so, because as far as I know the only real obstacle is that some intrinsics are not constexpr. But we can just wrap those intrinsics with if (!is_constant_evaluated()) and provide fallback implementations along with that. I'm experimenting myself with the recent master branch, and I guess Dragonbox is fine while it fails at this line, I do not know why.

Another issue is that the compiler is whining about static constexpr tables inside constexpr functions being static. (See e.g., https://stackoverflow.com/questions/62458079/static-constexpr-variables-in-a-constexpr-function.) Honestly I think this is a sort of nonsensical language restriction, but well, it is like that. A simple solution is to move those tables out of the functions.

closed time in 7 hours

jk-jeon

Pull request review commentfmtlib/fmt

changed detection of Intel Compiler Classic to distinguish MS-Windows

 FMT_BEGIN_NAMESPACE namespace detail { // Avoid Clang with Microsoft CodeGen's -Wunknown-pragmas warning. #  if !defined(__clang__)-#    pragma managed(push, off)+#    if !defined(__ICL)+#       pragma managed(push, off)+#    endif

Let's remove #pragma managed completely as we don't support managed extensions.

mborn-adi

comment created time in 8 hours

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentfmtlib/fmt

changed detection of Intel Compiler Classic to distinguish MS-Windows

 #  define FMT_GCC_PRAGMA(arg) #endif -#if defined(__INTEL_COMPILER)+#ifdef __ICL+#  define FMT_ICC_VERSION __ICL+#  define FMT_ICC_ON_WINDOWS 1

I suggest replacing FMT_ICC_ON_WINDOWS with FMT_ICC_POSIX defined to 1 on non-Windows platforms. This will simplify the checks.

mborn-adi

comment created time in 8 hours

Pull request review commentfmtlib/fmt

changed detection of Intel Compiler Classic to distinguish MS-Windows

 #  define FMT_GCC_PRAGMA(arg) #endif -#if defined(__INTEL_COMPILER)+#ifdef __ICL+#  define FMT_ICC_VERSION __ICL+#  define FMT_ICC_ON_WINDOWS 1+#elif defined(__INTEL_COMPILER) #  define FMT_ICC_VERSION __INTEL_COMPILER+#  define FMT_ICC_ON_WINDOWS 0 #else #  define FMT_ICC_VERSION 0+#  define FMT_ICC_ON_WINDOWS 0 #endif

Does Intel compiler define both __ICL and __INTEL_COMPILER on Windows?

mborn-adi

comment created time in 8 hours

PullRequestReviewEvent

PR closed fmtlib/fmt

fmt: disable consteval with clang

clang (at least appleclang 12.5/13) ICEs when consteval is enabled.

reduced test case: https://bugs.llvm.org/show_bug.cgi?id=51938

+1 -1

3 comments

1 changed file

timblechmann

pr closed time in 8 hours

pull request commentfmtlib/fmt

fmt: disable consteval with clang

Anyway, I don't think we should disable consteval in clang completely considering that clang 11 passes all tests. You can compile with -DFMT_CONSTEVAL= to disable consteval support in {fmt} in your project.

timblechmann

comment created time in 8 hours

push eventfmtlib/fmt

jk-jeon

commit sha 9c57357e05d8c5696ad75c609c3249ea7290194a

Add `static` to a table (#2509)

view details

push time in 8 hours

pull request commentfmtlib/fmt

Add `static` to a table

Thanks!

jk-jeon

comment created time in 8 hours

PR merged fmtlib/fmt

Add `static` to a table

<!-- Please read the contribution guidelines before submitting a pull request: https://github.com/fmtlib/fmt/blob/master/CONTRIBUTING.md. By submitting this pull request, you agree that your contributions are licensed under the {fmt} license, and agree to future changes to the licensing. --> As mentioned here and here, GCC fails to optimize non-static constexpr table initialization, so it is better to add static keyword here.

+1 -1

0 comment

1 changed file

jk-jeon

pr closed time in 8 hours

PullRequestReviewEvent

Pull request review commentfmtlib/fmt

Add support for Bazel

+# Bazel support++Bazel is an open-source build tool.+More information about Bazel can be found [here](https://bazel.build/).++## Using the fmt repository with Bazel++Even the `fmt` repository does not contain a `WORKSPACE` file in its root directory,

Seems like "though" is missing after "Even".

Vertexwahn

comment created time in 8 hours

Pull request review commentfmtlib/fmt

Add support for Bazel

+cc_library(+    name = "fmt",+    srcs = [+        "include/fmt/args.h",+        "include/fmt/chrono.h",+        "include/fmt/color.h",+        "include/fmt/compile.h",+        "include/fmt/core.h",+        "include/fmt/format.h",+        "include/fmt/format-inl.h",+        "include/fmt/locale.h",+        "include/fmt/os.h",+        "include/fmt/ostream.h",+        "include/fmt/printf.h",+        "include/fmt/ranges.h",+        "include/fmt/xchar.h",

Shouldn't these be in hdrs?

Vertexwahn

comment created time in 8 hours

PullRequestReviewEvent

startediains/clang-cxx20-modules

started time in a day

Pull request review commentfmtlib/fmt

Add support for Bazel

+# Bazel support++## Bazelize fmt++To get [Bazel](https://bazel.build/) working with `fmt` you can copy the files `BUILD.bazel`, `WORKSPACE.bazel`, `.bazelrc`, and `.bazelversion` from this folder (`support/bazel`) to the root folder of this project.++This way `fmt` gets bazelized and can be used in your Bazel builds.++**Example**++Create a `WORKSPACE.bazel` file with the following content:++```python+load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")++# Fetch fmt+git_repository(+    name = "fmt",+    branch = "bazel-support", # A copy of master where BUILD.bazel, WORKSPACE.bazel, .bazelrc and .bazelversion are move to root+    remote = "https://github.com/<user_or_organistzion>/fmt", # replace <user_or_organisation> by a valid accunt+)+```++Create a `BUILD.bazel `file and add a dependency to `fmt`:++```python+cc_binary( # Build a binary+    name = "Demo", # Name of the Binary+    srcs = ["main.cpp"], # List of files - we only have main.cpp+    deps = ["@fmt//:fmt"], # Depend on fmt+)+```++Make use of `fmt` in `main.cpp`:++```C+++#include "fmt/core.h"++#include <iostream>++int main() {+    std::string message = fmt::format("The answer is {}.", 42);++    std::cout << message << std::endl;+    +    return 0;+}

Here and below I recommend using fmt::print instead of iostreams:

#include "fmt/core.h"

int main() {
  fmt::print("The answer is {}.\n", 42);
}
Vertexwahn

comment created time in 2 days

PullRequestReviewEvent

pull request commentfmtlib/fmt

fmt: disable consteval with clang

Could you provide a repro that triggers the ICE? The one in the clang but report doesn't seem to compile.

timblechmann

comment created time in 2 days

issue commentfmtlib/fmt

Questions about FMT_COMPILE

Positional arguments are supported in both FMT_STRING and FMT_COMPILE.

alexezeder

comment created time in 3 days