]> https://gitweb.dealii.org/ - dealii.git/commit
Specialize BoundingBox<0> to prevent instantiating BoundingBox<-1>. 10235/head
authorDavid Wells <drwells@email.unc.edu>
Fri, 15 May 2020 21:11:33 +0000 (17:11 -0400)
committerDavid Wells <drwells@email.unc.edu>
Fri, 15 May 2020 21:11:33 +0000 (17:11 -0400)
commit6f3c6945d58341c7f68ae99833391b83a27bd079
tree5d45bbc434cbdc785855a933632624953ac05e4e
parentce25602ca54ccc212e7bd875f53df04b6d793f08
Specialize BoundingBox<0> to prevent instantiating BoundingBox<-1>.

A zero-dimensional bounding box doesn't make sense and causes weird problems
with intel's compiler when the compiler tries to instantiate
BoundingBox::cross_section().

We have to use this workaround and not something like

    BoundingBox<spacedim != 1 ? spacedim - 1 : 1, Number>
    cross_section(const unsigned int direction) const;

to make MSVC happy.
include/deal.II/base/bounding_box.h
tests/base/bounding_box_6.cc
tests/base/bounding_box_6.output

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.