Project
Loading...
Searching...
No Matches
cxx14-test-user-defined-literals.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
17
18#include <chrono>
19#include <complex>
20#include <string>
21
23{
24 using namespace std::literals;
25 auto strl = "hello world"s;
26 std::string str = "hello world";
27 if (str.compare(strl) == 0) {
28 return true;
29 } else {
30 return false;
31 }
32}
33
35{
36 using namespace std::chrono_literals;
37 auto durl = 60s;
38 std::chrono::seconds dur(60);
39 return (durl == dur);
40}
41
43{
44 using namespace std::literals::complex_literals;
45 auto zl = 1i;
46 std::complex<double> z(0, 1);
47 return (zl == z);
48}
49
50int main() { return (testComplex() && testString() && testChrono()) ? 0 : 1; }
int32_t i
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
const std::string str