File: test-constexpr-geometrytype.cc

package info (click to toggle)
dune-geometry 2.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 2,304 kB
  • sloc: cpp: 15,221; python: 253; makefile: 3
file content (18 lines) | stat: -rw-r--r-- 563 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception

#include <iostream>

#include <dune/geometry/type.hh>

int main ( int /* argc */, char ** /* argv */ )
{
  constexpr auto gt_none_1 = Dune::GeometryType();
  constexpr auto gt_none_2 = Dune::GeometryTypes::none(0);
  return not std::integral_constant<
    bool,
    gt_none_1.isNone()
    and gt_none_1 == gt_none_2
    and Dune::GeometryType(1,1) == Dune::GeometryTypes::line
    >{};
}