This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename Codecvt = std::codecvt_utf8<wchar_t>> | |
inline std::wstring to_wstring(const std::string& s) | |
{ | |
std::wstring_convert<Codecvt> conv; | |
return conv.from_bytes(s); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename T, typename = void> | |
struct is_size_constructible : std::false_type {}; | |
template <typename T> | |
struct is_size_constructible<T, std::void_t<typename T::size_type>> | |
: std::is_constructible<T, typename T::size_type> {}; | |
template <typename T> | |
inline constexpr bool is_size_constructible_v = is_size_constructible<T>::value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// `type_triple` specializations to use with TYPED_TEST for MultiTypedTest | |
using MultiTypedTestTypes = ::testing::Types< | |
type_triple<int, double, float>, | |
type_triple<char, std::string, size_t>, | |
type_triple<std::string, double, void *> | |
>; | |
// required macro to set up the typed test suite | |
TYPED_TEST_SUITE(MultiTypedTest, MultiTypedTestTypes); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename T, typename U, typename V> | |
class func_type_triple { | |
public: | |
using type_a = T; | |
using type_b = U; | |
using type_c = V; | |
}; | |
using dat_triple = func_type_triple<int, double, char>; |