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

bug in source code #28

Open
mczerski opened this issue Oct 23, 2022 · 2 comments · May be fixed by #29
Open

bug in source code #28

mczerski opened this issue Oct 23, 2022 · 2 comments · May be fixed by #29

Comments

@mczerski
Copy link

return throw_logic_error(

the above line should be:

throw throw_logic_error( 
@laoshanxi
Copy link

laoshanxi commented Feb 21, 2023

I also face this problem when I using C++14, is there any fork project contain this fix?

In file included from /home/code/app-mesh/src/daemon/Label.cpp:4:0:
/usr/local/include/wildcards/wildcards.hpp: In instantiation of ‘constexpr bool wildcards::detail::is_alt(PatternIterator, PatternIterator, const wildcards::cards<typename wildcards::iterated_item<It>::type>&, wildcards::detail::is_alt_state, int) [with PatternIterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename wildcards::iterated_item<It>::type = char]’:
/usr/local/include/wildcards/wildcards.hpp:1548:48:   required from ‘constexpr wildcards::detail::match_result<SequenceIterator, PatternIterator> wildcards::detail::match(SequenceIterator, SequenceIterator, PatternIterator, PatternIterator, const wildcards::cards<typename wildcards::iterated_item<PatternIterator>::type>&, const EqualTo&, bool, bool) [with SequenceIterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; PatternIterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; EqualTo = cx::equal_to<void>; typename wildcards::iterated_item<PatternIterator>::type = char]’
/usr/local/include/wildcards/wildcards.hpp:1785:14:   required from ‘constexpr wildcards::full_match_result<typename wildcards::const_iterator<Sequence>::type, typename wildcards::const_iterator<C>::type> wildcards::matcher<Pattern, EqualTo>::matches(Sequence&&) const [with Sequence = const std::__cxx11::basic_string<char>&; Pattern = const std::__cxx11::basic_string<char>&; EqualTo = cx::equal_to<void>; typename wildcards::const_iterator<C>::type = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename wildcards::const_iterator<Sequence>::type = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >]’
/home/code/app-mesh/src/daemon/Label.cpp:77:133:   required from here
/usr/local/include/wildcards/wildcards.hpp:1200:76: error: cannot convert ‘__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >’ to ‘bool’ in return
 p, "The program execution should never end up here throwing this exception");
                                                                            ^
make[2]: *** [src/daemon/CMakeFiles/appsvc.dir/build.make:118: src/daemon/CMakeFiles/appsvc.dir/Label.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:591: src/daemon/CMakeFiles/appsvc.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

@uilianries
Copy link

uilianries commented Mar 22, 2024

This fix is simple, remove the check for clang here:

https://github.com/zemasoft/wildcards/blob/master/single_include/wildcards.hpp#L570

@uilianries uilianries linked a pull request Mar 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants