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
This can cause the cppfront compiler to fail to build - for example when using AppleClang 13.0.0.
To Reproduce
Build the cppfront compiler on macOS using AppleClang 13.0.0. The build fails with the following output:
/Users/User/Documents/dev/cpp/cppfront/./source/../include/cpp2util.h:1412:13: error: redefinition of 'to_string' as different kind of symbol
inline auto to_string(std::same_as<std::any> auto const&) -> std::string {
^
/Users/User/Documents/dev/cpp/cppfront/./source/../include/cpp2util.h:1408:13: note: previous definition is here
inline auto to_string(...) -> std::string {
^
/Users/User/Documents/dev/cpp/cppfront/./source/../include/cpp2util.h:1412:28: error: no member named 'same_as' in namespace 'std'
inline auto to_string(std::same_as<std::any> auto const&) -> std::string {
~~~~~^
After including the <concepts> header the build succeeds.
The text was updated successfully, but these errors were encountered:
Describe the bug
std::same_as
from the<concepts>
header is used to constrain one of theto_string
overloads incpp2util.h
(https://github.com/hsutter/cppfront/blob/38aec572f34997699454efdb13cf4e4e409c2cc7/include/cpp2util.h#LL1411C61-L1411C61). However the<concepts>
header is not explicitly included incpp2util.h
.This can cause the cppfront compiler to fail to build - for example when using AppleClang 13.0.0.
To Reproduce
Build the cppfront compiler on macOS using AppleClang 13.0.0. The build fails with the following output:
After including the
<concepts>
header the build succeeds.The text was updated successfully, but these errors were encountered: