コード例 #1
0
	static AritT FromString(const std::string& str) {
		if (str.empty()) {
			throw InvalidCastException("Cannot convert empty string to artihmetic.");
		}
		char* pend = nullptr;
		AritT value;
		if constexpr (std::is_integral_v<AritT> && std::is_signed_v<AritT>) {
			value = (AritT)strtoll(str.c_str(), &pend, 10);
		}
		else if (std::is_integral_v<AritT> && !std::is_signed_v<AritT>) {
コード例 #2
0
	void SimpleCPPSample::ExpectAnException()
	{
		throw gcnew InvalidCastException();
	}
コード例 #3
0
	void SimpleCPPSample::IgnoredTest()
	{
		throw gcnew InvalidCastException();
	}