Can any function be a deleted-function?
Posted
by Caspin
on Stack Overflow
See other posts from Stack Overflow
or by Caspin
Published on 2010-05-20T15:37:02Z
Indexed on
2010/05/20
15:40 UTC
Read the original article
Hit count: 237
The working draft explicitly calls out that defaulted-functions must be special member functions (eg copy-constructor, default-constructor, etc). Which makes perfect sense.
However, I don't see any such restriction on deleted-functions. Is that right?
Or in other words are these three examples valid c++0
?
struct Foo
{
// 1
int bar( int ) = delete;
};
// 2
int baz( int ) = delete;
template< typename T >
int boo( T t );
// 3
template<>
int boo<int>(int t) = delete;
© Stack Overflow or respective owner