Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/utility/functional/bad function call"

From cppreference.com
< cpp‎ | utility‎ | functional
m (Text replace - "{{mark c++11 feature}}" to "{{mark since c++11}}")
(fmt)
Line 12: Line 12:
 
===Member functions===
 
===Member functions===
 
{{dcl list begin}}
 
{{dcl list begin}}
{{dcl list mem ctor | cpp/functional/bad_function_call/bad_weak_ptr | Constructs the bad_function_call object}}
+
{{dcl list mem ctor | cpp/functional/bad_function_call/bad_function_call | constructs the bad_function_call object}}
{{dcl list mem vfun | cpp/functional/bad_function_call/what | Returns the explanatory string}}
+
{{dcl list mem vfun | cpp/functional/bad_function_call/what | returns the explanatory string}}
 
{{dcl list end}}
 
{{dcl list end}}
  
Line 24: Line 24:
 
#include <iostream>
 
#include <iostream>
 
#include <functional>
 
#include <functional>
 +
 
int main()
 
int main()
 
{
 
{

Revision as of 07:03, 20 January 2012

Template:cpp/utility/functional/sidebar Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <functional>
</td>

<td></td> <td></td> </tr> <tr class="t-dcl ">

<td >
class bad_function_call : public std::exception;
</td>

<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> Template:ddcl list end

std::bad_function_call is the type of the exception thrown by function::operator() if the function wrapper has no target.

Member functions

constructs the bad_function_call object
(public member function of Template:cpp/functional/bad function call/title)
[virtual]
returns the explanatory string
(virtual public member function of Template:cpp/functional/bad function call/title)

Template:cpp/error/exception/exception/inherit

Example

Template:example cpp

See also

(C++11)
copyable wrapper of any copy constructible callable object
(class template) [edit]