Skip to content

Many version of the function "void to_json(json& j, const MyStruct& struct)" #2171

@Orionus

Description

@Orionus

I have created two version of the function:
static void to_json(json& j, const MyStruct& struct) {...};
in modul_1.cpp and modul_2.cpp, but modul_1.cpp uses function not from itself but from modul_2.cpp

What do you want to achieve?

how to declare void to_json(json& j, const MyStruct& struct) in two modules so that each one uses its own version?

What have you tried?

Can you provide a small code example?

Which compiler and operating system are you using?

  • Compiler: gcc 9.2.0
  • Operating system: Windows 10

Which version of the library did you use?

  • latest release version 3.7.3
  • other release - please state the version: ___
  • the develop branch

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: questionstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updated

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions