Support std::variant
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with the supplied main() reproducer and compare its std::variant behavior with the boost::variant version. Trace how boost::format handles the formatted argument, then verify that the reproducer works with std::variant and retains existing boost::variant behavior.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- C++
- Stars
- 31
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/format
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
sprintf deprecated Open
Difficulty 2/5 1-3 hours Newbie friendliness 50/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·