throw_exception_fail.cpp

来自「Boost provides free peer-reviewed portab」· C++ 代码 · 共 19 行

CPP
19
字号
//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc.//Distributed under the Boost Software License, Version 1.0. (See accompanying//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)#include <boost/throw_exception.hpp>structmy_exception    {    };voidtester()    {    //Must not compile, throw_exception requires exception types to derive std::exception.    boost::throw_exception(my_exception());    }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?