J
JKop
Does that Standard explicitly forbid the initiation of a null reference? Is
there anything wrong with the following code?:
void Blah( std::string const &k )
{
if ( !&k ) return;
// work with k
}
int main()
{
Blah( *static_cast<std::string* const>( 0 ) );
}
(Not sure if reinterpret_cast is required there...)
-JKop
there anything wrong with the following code?:
void Blah( std::string const &k )
{
if ( !&k ) return;
// work with k
}
int main()
{
Blah( *static_cast<std::string* const>( 0 ) );
}
(Not sure if reinterpret_cast is required there...)
-JKop