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

hash_value doesn't work at all #156

Open
denzor200 opened this issue Dec 26, 2023 · 0 comments
Open

hash_value doesn't work at all #156

denzor200 opened this issue Dec 26, 2023 · 0 comments

Comments

@denzor200
Copy link
Contributor

https://godbolt.org/z/q6McGYzGW

error: no matching function for call to 'hash_detector_msvc_helper<const my_struct&, const my_struct&>(long int)'
   55 |     template <class T1, class T2> using hash_detector = decltype(hash_detector_msvc_helper<T1,T2>(1L));
      |                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/opt/compiler-explorer/libs/boost_1_83_0/boost/pfr/detail/detectors.hpp:53:29: note: candidate: 'template<class S> decltype (std::hash<_Tp>{}(declval<S>())) boost::pfr::detail::hash_detector_msvc_helper(long int)'
   53 |     template <class S> auto hash_detector_msvc_helper(long) -> decltype(std::hash<S>{}(std::declval<S>()));
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/boost_1_83_0/boost/pfr/detail/detectors.hpp:53:29: note:   template argument deduction/substitution failed:
/opt/compiler-explorer/libs/boost_1_83_0/boost/pfr/detail/detectors.hpp:55:98: error: wrong number of template arguments (2, should be 1)
   55 |     template <class T1, class T2> using hash_detector = decltype(hash_detector_msvc_helper<T1,T2>(1L));
      |                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/opt/compiler-explorer/libs/boost_1_83_0/boost/pfr/detail/detectors.hpp:53:29: note: provided for 'template<class S> decltype (std::hash<_Tp>{}(declval<S>())) boost::pfr::detail::hash_detector_msvc_helper(long int)'
   53 |     template <class S> auto hash_detector_msvc_helper(long) -> decltype(std::hash<S>{}(std::declval<S>()));
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/boost_1_83_0/boost/pfr/detail/detectors.hpp:54:38: note: candidate: 'template<class S> boost::pfr::detail::can_not_apply boost::pfr::detail::hash_detector_msvc_helper(int)'
   54 |     template <class S> can_not_apply hash_detector_msvc_helper(int);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/boost_1_83_0/boost/pfr/detail/detectors.hpp:54:38: note:   template argument deduction/substitution failed:
/opt/compiler-explorer/libs/boost_1_83_0/boost/pfr/detail/detectors.hpp:55:98: error: wrong number of template arguments (2, should be 1)
   55 |     template <class T1, class T2> using hash_detector = decltype(hash_detector_msvc_helper<T1,T2>(1L));
      |                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/opt/compiler-explorer/libs/boost_1_83_0/boost/pfr/detail/detectors.hpp:54:38: note: provided for 'template<class S> boost::pfr::detail::can_not_apply boost::pfr::detail::hash_detector_msvc_helper(int)'
   54 |     template <class S> can_not_apply hash_detector_msvc_helper(int);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~

BTW no issues with boost::pfr::hash_fields

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

No branches or pull requests

1 participant