LibRapid / librapid

A highly optimised C++ library for mathematical applications and neural networks.
http://librapid.rtfd.io
MIT License
164 stars 10 forks source link

Remove "patch" definitions #135

Closed Pencilcaseman closed 1 year ago

Pencilcaseman commented 2 years ago

Describe the bug The patch() functions defined in the multiprecision source files when multiprecision is NOT enabled should be removed/fixed

To Reproduce Steps to reproduce the behavior:

  1. Include LibRapid without LIBRAPID_USE_MULTIPREC

Minimal Reproducable Example

#include <librapid>

int main() {
    fmt::print("Hello, World\n");
    return 0;
}

Expected behavior No warnings

Stack Traces

multiprecModAbs.cpp.obj : warning LNK4006: "int __cdecl patch(int)" (?patch@@YAHH@Z) already defined in multiprecTrig.cpp.obj; second definition ignored
multiprecHypot.cpp.obj : warning LNK4006: "int __cdecl patch(int)" (?patch@@YAHH@Z) already defined in multiprecTrig.cpp.obj; second definition ignored
multiprecFloorCeil.cpp.obj : warning LNK4006: "int __cdecl patch(int)" (?patch@@YAHH@Z) already defined in multiprecTrig.cpp.obj; second definition ignored
multiprecExpLogPow.cpp.obj : warning LNK4006: "int __cdecl patch(int)" (?patch@@YAHH@Z) already defined in multiprecTrig.cpp.obj; second definition ignored
multiprecCasting.cpp.obj : warning LNK4006: "int __cdecl patch(int)" (?patch@@YAHH@Z) already defined in multiprecTrig.cpp.obj; second definition ignored