Opened 7 years ago
Closed 7 years ago
#11571 closed Bugs (fixed)
Can't compile BOOST_TEST( ..., per_element() ) comparison of vector<string>
Reported by: | Owned by: | Raffi Enficiaud | |
---|---|---|---|
Milestone: | Boost 1.60.0 | Component: | test |
Version: | Boost 1.59.0 | Severity: | Problem |
Keywords: | test, BOOST_TEST, per_element, collections, string, vector | Cc: |
Description
Thanks for the new BOOST_TEST() and per_element() tools, which look very useful.
Unfortunately, the following simple vector<string> example fails to compile under both g++ -std=c++11
and clang++ -std=c++11 -stdlib=libc++
.
#define BOOST_TEST_MODULE comp_str_mod #include <boost/test/included/unit_test.hpp> #include <string> #include <vector> BOOST_AUTO_TEST_CASE( comp_strs ) { std::vector<std::string> a{ "ann" }; std::vector<std::string> b{ "bry" }; BOOST_TEST( a == b, boost::test_tools::per_element() ); }
The core part of GCC's error message is:
error: ‘revert’ is not a member of ‘boost::test_tools::assertion::op::EQ<std::basic_string<char>, std::basic_string<char>, void>’
If I'm doing it wrong, is there any way we can make the compile errors and/or documentation clearer about avoiding this? Thanks.
Attachments (1)
Change History (11)
by , 7 years ago
comment:1 by , 7 years ago
Thank you for the report. Please use attached fix for the resolution in 1.59
comment:2 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 by , 7 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Reopenning for keeping track of the change, will close issue when merged to master
comment:7 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:8 by , 7 years ago
Status: | new → assigned |
---|
comment:9 by , 7 years ago
Milestone: | To Be Determined → Boost 1.60.0 |
---|
Note:
See TracTickets
for help on using tickets.
Fix