Description
when i use vs2022, Something went wrong! when I define hana struct like this:
struct Person {
BOOST_HANA_DEFINE_STRUCT(Person,
(std::string, name),
(unsigned short, age)
);
Person john{ "John", 30 };
boost::hana::find(john, BOOST_HANA_STRING("name")) == boost::hana::just("John");
};
Error !!
1>F:\boost_1_81_0\boost\hana\traits.hpp(71,80): error C4996: 'std::is_pod': warning STL4025: std::is_pod and std::is_pod_v are deprecated in C++20. The std::is_trivially_copyable and/or std::is_standard_layout traits likely suit your use case. You can define _SILENCE_CXX20_IS_POD_DEPRECATION_WARNING or _SILENCE_ALL_CXX20_DEPRECATION_WARNINGS to acknowledge that you have received this warning. 1>F:\boost_1_81_0\boost\hana\traits.hpp(74,89): error C2039: 'is_literal_type': is not a member of 'std' 1>D:\vs2022\Community\VC\Tools\MSVC\14.29.30133\include\iostream(19): message : see declaration of 'std' 1>F:\boost_1_81_0\boost\hana\traits.hpp(74,104): error C3536: 'boost::hana::traits::is_literal_type': cannot be used before it is initialized 1>F:\boost_1_81_0\boost\hana\traits.hpp(74,104): error C3200: 'int': invalid template argument for template parameter 'F', expected a class template 1>F:\boost_1_81_0\boost\hana\traits.hpp(74,105): error C3200: 'int': invalid template argument for template parameter 'F', expected a class template 1>F:\boost_1_81_0\boost\hana\traits.hpp(74,105): error C2641: cannot deduce template arguments for 'boost::hana::traits::detail::hana_trait' 1>F:\boost_1_81_0\boost\hana\traits.hpp(74,105): error C2783: 'boost::hana::traits::detail::hana_trait<F> boost::hana::traits::detail::hana_trait(void)': could not deduce template argument for 'F' 1>F:\boost_1_81_0\boost\hana\traits.hpp(27): message : see declaration of 'boost::hana::traits::detail::hana_trait' 1>F:\boost_1_81_0\boost\hana\traits.hpp(74,106): error C2780: 'boost::hana::traits::detail::hana_trait<F> boost::hana::traits::detail::hana_trait(boost::hana::traits::detail::hana_trait<F>)': expects 1 arguments - 0 provided 1>F:\boost_1_81_0\boost\hana\traits.hpp(27): message : see declaration of 'boost::hana::traits::detail::hana_trait' 1>F:\boost_1_81_0\boost\hana\traits.hpp(74,47): error C2737: 'boost::hana::traits::is_literal_type': constexpr object must be initialized 1>G:\git\ConsoleApplication6\ConsoleApplication6.cpp(29,18): error C2078: too many initializers
What can I do for this??