catchorg / catchorg/Catch2

Compiler Error when using boost fusion, catch2 and a print function

Open
#2,569 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

**Describe the bug**
Compiler error when defining a boost fusion struct a free operator<< function before including '#include ' and calling REQUIRE(std::vector{}==std::vector{}).

**Expected behavior**
Should compile.

**Reproduction steps**
[Code which reproduces the error](https://godbolt.org/z/sY7hYzjT3)

1. define a boost fusion struct
2. define 'inline std::ostream &operator<< (std::ostream &os, shared_class::Nested const &nested);'
3. include 'catch2/catch_test_macros.hpp'
4. Create a TEST_CASE and call 'REQUIRE (std::vector{} == std::vector{}); '

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.