octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61711] Test errors for sorting NaN values on


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #61711] Test errors for sorting NaN values on Windows with visibility flags
Date: Sun, 6 Nov 2022 05:58:08 -0500 (EST)

Update of bug #61711 (project octave):

                  Status:             In Progress => Patch Submitted        

    _______________________________________________________

Follow-up Comment #10:

The classes exported by the standard library are a bit different conceptually
from what we do with the Array<T> template class.
In the standard library, instead of exporting specialized template classes
directly, they do the "specialization" in child classes.
E.g., for the `std::basic_string<T>` template class, instead of exporting the
specializations in `std::basic_string<char>`, they create a child class
`std::string` and export that child class with any "specializations" (i.e.,
overloaded methods).

In liboctave and liboctinterp, we'd like to export things like `Array<double>`
including any specializations directly (without an "indirection" through a
child class).

That means the same concepts that are used for exporting template classes in
the standard library cannot be applied directly to Octave.
However, it is still possible to imitate some of the ideas to our use case.

The attached patch is an attempt to mimic the more fine-grained visibility
flags that they are using in libcxx and apply that idea to our template
classes.
Since we are building a couple of different libraries that link to each other,
that results in a whole lot of API flags that could potentially be used. Not
all of them are used in all libraries currently. But I figured it would make
sense to nevertheless define all of them for symmetry reasons (see the changes
in `oct-conf-post-public.in.h`).

Judging from how they define these flags, MSVC and MinGW compilers seem to
require different combinations of attributes. Afaict, currently no one is
building Octave with MSVC. But I kept the distinction they are making
anyways.

Is there a way to not having to repeat these definitions almost identically
several times? E.g., can a pre-processor macro be used to create several
pre-processor definitions?


(file #53931)

    _______________________________________________________

Additional Item Attachment:

File name: bug61711-template-visibility.patch Size:54 KB
   
<https://file.savannah.gnu.org/file/bug61711-template-visibility.patch?file_id=53931>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61711>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]