[C++] extern "C" and namespaces
From: the Bare (grrr_at_wild.net)
Date: 10/27/03
- Next message: Base8: "help with menus"
- Previous message: Irrwahn Grausewitz: "Does calloc() create arrays? was Re: [C]Understanding arrays/pointers"
- Next in thread: Ulrich Eckhardt: "Re: [C++] extern "C" and namespaces"
- Reply: Ulrich Eckhardt: "Re: [C++] extern "C" and namespaces"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 27 Oct 2003 22:52:26 GMT
Hi:
Is the following legal? It compiles, but is this guaranteed according
to the standard?
// In a header file
namespace opt
{
extern "C"
{
inline int func( int i, double d )
{
extern int efunc( int, double );
efunc( i, d );
}
} // extern "C"
} // namespace opt
I'm doing this because I'm trying to avoid polluting the global
namespace, which the following would do:
// In a header file
extern "C"
{
extern int efunc( int i, double d );
}
Thanks,
Cameron
- Next message: Base8: "help with menus"
- Previous message: Irrwahn Grausewitz: "Does calloc() create arrays? was Re: [C]Understanding arrays/pointers"
- Next in thread: Ulrich Eckhardt: "Re: [C++] extern "C" and namespaces"
- Reply: Ulrich Eckhardt: "Re: [C++] extern "C" and namespaces"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|