Skip to content

libc++ complains about fmt<float> #129

@wsehjk

Description

@wsehjk

The file tutorial_context.cpp defines a templated fma function and attempts to instantiate a callable of type fma. However, Clang emits the error:

"candidate template ignored: couldn't infer template argument 'Op'"

This happens because template argument deduction fails for Op, as explained in this LLVM commit.

We can fix this by wrapping fma in a lambda:

-        .run("fma", fma<float>);
+        .run("fma", [](){
+            fma<float>();
+        });
     bench.context("scalar", "f64")
         .context("foo", "baz")
         .run("+=", plus_eq<double>)
-        .run("fma", fma<double>);
+        .run("fma", [](){
+            fma<double>();
+        });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions