Commit 3a79bde
authored
Remove deprecated std::binary_function inheritance for C++17 compatibility (#56)
## Summary
- Necessary to make it work ->
oxeanbits/parsec-web#2
- Remove `std::binary_function<TString, TString, bool>` inheritance from
`SortByLength` struct in `parser/suSortPred.h`
- Fixes C++17 compatibility issue where `std::binary_function` was
removed from the standard
- Enables WebAssembly compilation which requires modern C++ standards
- Updates `README.md` with a muuuch better version of it
## Details
The `std::binary_function` base class was deprecated in C++11 and
removed in C++17. The `SortByLength` functor doesn't need this
inheritance as it already provides the required `operator()` method.
This change maintains full functionality while ensuring compatibility
with C++17 and later standards, which is necessary for WebAssembly
compilation.
## Test plan
- [x] Verify compilation succeeds with C++17
- [x] Confirm WebAssembly build works
- [x] Ensure existing functionality remains unchanged1 parent e7650c1 commit 3a79bde
1 file changed
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| |||
0 commit comments