File: comparetest.cc

package info (click to toggle)
dune-common 2.11.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,048 kB
  • sloc: cpp: 54,403; python: 4,136; sh: 1,657; makefile: 17
file content (17 lines) | stat: -rw-r--r-- 683 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
#include <dune/common/std/compare.hh>

int main(int argc, char** argv)
{
  using namespace Dune;

  static_assert(Std::three_way_comparable<double>);
  static_assert(Std::three_way_comparable_with<double,double>);
  static_assert(Std::three_way_comparable_with<double,float>);
  static_assert(Std::three_way_comparable_with<double,int>);

  static_assert(not Std::three_way_comparable_with<unsigned int,int>);
}