You don't need anything like this for C++
You don't need anything like this for C++
Posted Jul 3, 2012 19:49 UTC (Tue) by cmccabe (guest, #60281)In reply to: You don't need anything like this for C++ by joib
Parent article: Calling for a new openSUSE development model
One thing I'm curious about. Are you intended to duplicate all of your declarations in both namespaces, or are you intended to do something like this:
namespace version1 {
void foo(int64_t a);
void bar(int);
}
namespace version2 {
void foo(float b);
using namespace version1;
}
If you are intended to do something like what I've just described, there are obvious problems with implicit type conversions. For example, foo(0x123456789LL) will give you the version1 function, whereas foo(0x1234) will give you the version2 function, which is probably not what you want.
Ultimately, this seems like just another variant of "new version, new datatypes / functions," which you can easily do in C or older versions of C++. You can even hide the old version declarations in the header file by default using macros. I think FUSE does this-- if you don't set FUSE_VERSION to an "old" number, you can't see the old deprecated APIs in the header file.
