You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual result: The compilation fails with an error message,
/usr/include/c++/v1/type_traits:2928:50:
error: invalid use of incomplete type ‘struct Catch_global_namespace_dummy’
decltype(__is_constructible_test(declval<_Tp>(), declval<_Args>()...))
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Other combinations that fail: any other supported version of g++ with libc++.
Other combinations that succeed:
Any supported version of g++ with libstd++-v3.
Any supported version of clang++ with libstdc++-v3.
In include/internal/catch_tostring.h there is the code
// We need a dummy global operator<< so we can bring it into Catch namespace laterstructCatch_global_namespace_dummy;
std::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy);
namespaceCatch {
// Bring in operator<< from global namespace into Catch namespaceusing ::operator<<;
Suggested fix
When Catch_global_namespace_dummy is changed to
structCatch_global_namespace_dummy {};
the Trompeloeil unit test code compiles with success.
The text was updated successfully, but these errors were encountered:
AndrewPaxie
changed the title
Make Catch_global_namespace_dummy a complete type
Make Catch_global_namespace_dummy a complete type
Nov 19, 2017
Description
Compile the unit tests for the Trompeloeil mock object library,
in this particular combination of C++ Standard Library and compiler,
Operating system: Ubuntu 17.10 (Artful Aardvark)
Compiler:
g++-7
(from packageg++-7 7.2.0-8ubuntu3
)Standard C++ Library:
libc++
(from packagelibc++-dev:amd64 3.9.1-3
)Catch version: v2.0.1
Expected result: The unit tests compile and pass.
Actual result: The compilation fails with an error message,
Other combinations that fail: any other supported version of
g++
withlibc++
.Other combinations that succeed:
g++
withlibstd++-v3
.clang++
withlibstdc++-v3
.clang++
withlibc++
.Steps to reproduce
Extra information
Supposed cause
In
include/internal/catch_tostring.h
there is the codeSuggested fix
When
Catch_global_namespace_dummy
is changed tothe Trompeloeil unit test code compiles with success.
The text was updated successfully, but these errors were encountered: