Giter VIP home page Giter VIP logo

Comments (7)

SkyToGround avatar SkyToGround commented on June 23, 2024 1

The CMake issue turned out to be a bit more complex than I thought which is partially to blame why I did not see this issue in my testing. The FMT library (when installed from source) will also install the correct "FindFMT"-files for CMake to use. This is also true for some FMT Conan packages. However, it seems that some newer FMT Conan packages (including the "conan-center" ones) has lost the files that makes "find_package(fmt)" work properly. I will have to give it a bit more thought to figure out the best solution to this issue.

from graylog-logger.

SkyToGround avatar SkyToGround commented on June 23, 2024

Hi, sorry for not getting back to you earlier. Give me until tomorrow to investigate the issues that you are having and I will try to formulate a plan for how they can be resolved.

from graylog-logger.

SkyToGround avatar SkyToGround commented on June 23, 2024

It took a little while for me to remember why I put the arguments in a tuple and thus had to use minimal::apply. The reason being that if the user of the library supplies a reference to a variable as an argument, we will have a problem with dangling references. We have to make copies of all the used variables (using std::make_tuple and [=] when creating the lambda) and then convert that tuple back to template arguments using minimal::apply as std::apply is not a part of C++14. I am pretty sure that minimal::apply is implemented only using C++14 features. Can you post the compile errors that you are seeing?

from graylog-logger.

ed-alertedh avatar ed-alertedh commented on June 23, 2024

OK, I figured there was probably a good reason you were doing things that way!

It turned out the real issue is I have this at the top of my cpp source file.

#include <graylog_logger/Log.hpp>
...
using namespace std;

The compiler was trying to use std::invoke rather than your minimal::invoke (even with std=gnu++14).

I'm probably going to refactor to avoid using namespace now that I know it can interact with templates like this (lesson learned - Google style guide says not to do it for a reason). But perhaps qualifying this line as minimal::invoke(...) would help stop others falling into the same trap I did

return invoke(std::forward<F>(f), std::get<I>(std::forward<Tuple>(t))...);

from graylog-logger.

SkyToGround avatar SkyToGround commented on June 23, 2024

Sure, I can do that.

from graylog-logger.

SkyToGround avatar SkyToGround commented on June 23, 2024

This was somewhat more complicated than I thought and thus took much longer than I thought it would. Still, I think it is fixed now in PR #38.

from graylog-logger.

ed-alertedh avatar ed-alertedh commented on June 23, 2024

Brilliant, both fixes work in my setup! I thought you resolved this really quickly, many thanks.

from graylog-logger.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.