Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The project does not compile with GCC 7 #28

Closed
chfast opened this issue Aug 27, 2019 · 2 comments
Closed

The project does not compile with GCC 7 #28

chfast opened this issue Aug 27, 2019 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@chfast
Copy link

chfast commented Aug 27, 2019

Describe the bug

/home/builder/build/test/bench/filesystem.hpp: In instantiation of 'ghc::filesystem::path::path(const Source&, ghc::filesystem::path::format) [with Source = std::basic_string_view<char>; <template-parameter-1-2> = ghc::filesystem::path]':
/home/builder/build/test/bench/filesystem.hpp:2409:35:   required from here
/home/builder/build/test/bench/filesystem.hpp:1455:27: error: no matching function for call to 'toUtf8(const std::basic_string_view<char>&)'
     : _path(detail::toUtf8(source))
             ~~~~~~~~~~~~~~^~~~~~~~
/home/builder/build/test/bench/filesystem.hpp:1342:20: note: candidate: template<class charT, class traits, class Alloc, typename std::enable_if<(sizeof (charT) == 1), int>::type size> std::__cxx11::string ghc::filesystem::detail::toUtf8(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
 inline std::string toUtf8(const std::basic_string<charT, traits, Alloc>& unicodeString)
                    ^~~~~~
/home/builder/build/test/bench/filesystem.hpp:1342:20: note:   template argument deduction/substitution failed:
/home/builder/build/test/bench/filesystem.hpp:1455:27: note:   'const std::basic_string_view<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
     : _path(detail::toUtf8(source))
             ~~~~~~~~~~~~~~^~~~~~~~

To Reproduce
Compile with G++ 7 on Debian.

Expected behavior
Compiles.

Additional context
The GCC7 seems to be missing string_view or is not included.

@gulrak
Copy link
Owner

gulrak commented Aug 27, 2019

Hi, guessing from the line numbers and std::string_view, it looks like the version you are testing is the release version v1.2.4, which is the latest release, and you are compiling with -std=c++17.
v1.2.4 is not including #25, that brings the missing string_view specialization when compiling with at least c++17, so my guess is, it should work with the current master.
I didn't make a new release yet, as I first want to finish work on #27, so maybe around the next weekend. If possible, it would be cool if you could check if your code works with the current master version.

@gulrak gulrak added the duplicate This issue or pull request already exists label Aug 27, 2019
@chfast
Copy link
Author

chfast commented Aug 28, 2019

Yes, it builds with master.

@chfast chfast closed this as completed Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants