Mixing Old/New Syntax?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



We have developed a big library using managed C++. The project started
with .NET 1.0 and has been ported to .NET 1.1. Today we ship the library
compiled for .NET 1.1 and 2.0.

At the moment the whole code uses the "old" managed C++ syntax.
Due to the amount of code and the need of supporting .NET 1.1 it is
not possible for us to port the complete code to the new CLI/C++
syntax.

We would like to use the new Generics. We have written a Generic
class using the new syntax. After setting the property of this class in
the IDE to CLI/C++ is is possible to compile this class in the same project
as the other classes still using the old syntax.

But afterwards the real problem occurs. How can we use this new class
in classes, which are still using the old syntax? Including the header file
of the new class into old classes does not work (due to the mixture of
the new and the old syntax).

Is it possible to tell the compiler, which syntax a header files uses
(e.g. with a pragma)?

cu, Marco
.



Relevant Pages

  • Re: Segfault City
    ... it will at least compile if you just use gcc -o foo foo.c, ... "Use the following syntax: %s"), ... have anybody doing quality assurance of the code -- which, ...
    (comp.lang.c)
  • Re: "pointers" in /clr
    ... Although C++/CLI has stack syntax, the framework only supports pointer syntax for ref classes, and value classes are severely limited. ... Virtual functions must be explicitly declared "override" if they override an existing one. ... When you could really write it once and compile standard native C++ code into pure managed assemblies. ... Automatically substituting default arguments with function overriding for .NET. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Has Forth a punctuation?
    ... something that does not compile. ... As if wrong syntax was the only way to ... Until xlerb is defined, you can't compile or execute its name. ... The text interpreter is imposing a rule that xlerb must ...
    (comp.lang.forth)
  • Re: Make and Archives.
    ... >> files around and use make to compile from source to library. ... I see the following dependency line in your ... the file $OBJS, perform the task" ... that syntax on the left side of the ":". ...
    (comp.unix.programmer)
  • Re: Array of points, i.e. #(1@1 2@2 3@3...)
    ... embedding references to String objects (created at compile time) in your code. ... The syntax is the usual: ... But why should the feature be limited to instances of String? ...
    (comp.lang.smalltalk)