]> https://gitweb.dealii.org/ - dealii.git/commit
Specialize BoundingBox<0> to prevent instantiating BoundingBox<-1>. 10247/head
authorDavid Wells <drwells@email.unc.edu>
Fri, 15 May 2020 21:11:33 +0000 (17:11 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Sat, 16 May 2020 04:18:24 +0000 (00:18 -0400)
commitf5621c4e192c25981ed26c889d6c96ccf518bd6a
tree5765df297c580b1457b8171bb22774adec3f24a2
parente7499638db919ad7551f7520523d0ab262548f2c
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.