Skip to content

Support std::variant #78

Description

@heretic13

Hello. I have a problem with using std::variant with boost::format.
Visual Studio 2019 - 16.7.3
boost - 1.74

Sample code:

`
#include < iostream>
#include < variant>
#include <boost/variant.hpp>
#include <boost/format.hpp>

typedef std::variant<uint16_t, std::string> MemCaptureIdType;
//typedef boost::variant<uint16_t, std::string> MemCaptureIdType;

std::ostream& operator<<(std::ostream& os, const MemCaptureIdType& type)
{
return os;
}

int main()
{
auto tmp1 = MemCaptureIdType(0);

auto tmp = boost::format("%1%") % tmp1;

return 0;

}
`

But it works when I use boost::variant.
I think we need to support std::variant.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions