doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
66b5e5e7-f8a6-4336-b777-3039555c8af1
{ "language": "C++" }
```c++ // Copyright (c) 2018 Chris Ohk, Youngjoong Kim, SeungHyun Jeon // We are making my contributions/submissions to this project solely in our // personal capacity and are not conveying any rights to any intellectual // property of any third parties. #include <hspp/Cards/Entity.h> namespace Hearthstonepp { Entit...
```c++ // Copyright (c) 2018 Chris Ohk, Youngjoong Kim, SeungHyun Jeon // We are making my contributions/submissions to this project solely in our // personal capacity and are not conveying any rights to any intellectual // property of any third parties. #include <hspp/Cards/Entity.h> namespace Hearthstonepp { Entit...
eea738c2-38cf-4b24-b638-d1d7142651dd
{ "language": "C++" }
```c++ #include "selection_window.h" #include "../components/description_component.h" #include "../core/game_engine.h" #include "inspection_window.h" #include "listbox.h" void SelectionWindow::setup() { setEntities(static_cast<EntityHolder*>(getArgs())); setEscapeBehaviour(Window::EscapeBehaviour::CloseWindow...
```c++ #include "selection_window.h" #include "../components/description_component.h" #include "../core/game_engine.h" #include "inspection_window.h" #include "listbox.h" void SelectionWindow::setup() { setEntities(static_cast<EntityHolder*>(getArgs())); setEscapeBehaviour(Window::EscapeBehaviour::CloseWindow...
fa7aa561-4331-4b77-bb58-8acd55fc6e52
{ "language": "C++" }
```c++ #include "tst_configuration.h" void TST_Configuration::test() { CWF::Configuration configuration(""); configuration.setHost(QHostAddress("127.0.0.1")); configuration.setPort(8080); configuration.setDomain("www.test.com.xyz"); QVERIFY2(configuration.getHost().toString() == "127.0.0.1", "Shou...
```c++ #include "tst_configuration.h" void TST_Configuration::test() { CWF::Configuration configuration(""); configuration.setHost(QHostAddress("127.0.0.1")); configuration.setPort(8080); configuration.setDomain("www.test.com.xyz"); configuration.setMaxThread(200); QVERIFY2(configuration.getHo...
93a0ae6f-e08b-4e35-ad15-700c899cd248
{ "language": "C++" }
```c++ // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "config.h" #include "webkit/extensions/v8/playback_extension.h" namespace extensions_v8 { const char* kPlaybackExtensionName = ...
```c++ // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "config.h" #include "webkit/extensions/v8/playback_extension.h" namespace extensions_v8 { const char* kPlaybackExtensionName = ...
00d7965e-c09e-4645-8bc7-4b181880c1be
{ "language": "C++" }
```c++ #include <gtest/gtest.h> #include <stan/math/fwd/core/fvar.hpp> #include <stan/math/rev/core/var.hpp> #include <stan/math/prim/scal/meta/broadcast_array.hpp> TEST(foo, bar) { using stan::math::detail::broadcast_array; using stan::math::fvar; using stan::math::var; fvar<var> fv(0.0); broadcast_array<f...
```c++ #include <gtest/gtest.h> #include <stan/math/fwd/core/fvar.hpp> #include <stan/math/rev/core/var.hpp> #include <stan/math/prim/scal/meta/broadcast_array.hpp> TEST(foo, bar) { using stan::math::detail::broadcast_array; using stan::math::fvar; using stan::math::var; fvar<var> fv(1.0, 2.1); broadcast_ar...
2d0d0c8b-6df2-4b0c-ac1f-042c3bbd0305
{ "language": "C++" }
```c++ #include <cstdint> #include <Magick++/Blob.h> #include <Magick++/Image.h> #include "utils.cc" #define FUZZ_ENCODER_STRING_LITERAL_X(name) FUZZ_ENCODER_STRING_LITERAL(name) #define FUZZ_ENCODER_STRING_LITERAL(name) #name #ifndef FUZZ_ENCODER #define FUZZ_ENCODER FUZZ_ENCODER_STRING_LITERAL_X(FUZZ_IMAGEMAGICK_E...
```c++ #include <cstdint> #include <Magick++/Blob.h> #include <Magick++/Image.h> #include "utils.cc" #define FUZZ_ENCODER_STRING_LITERAL_X(name) FUZZ_ENCODER_STRING_LITERAL(name) #define FUZZ_ENCODER_STRING_LITERAL(name) #name #ifndef FUZZ_ENCODER #define FUZZ_ENCODER FUZZ_ENCODER_STRING_LITERAL_X(FUZZ_IMAGEMAGICK_E...
6acbb747-a93f-481b-a009-b71d284a8541
{ "language": "C++" }
```c++ // This file is a part of the IncludeOS unikernel - www.includeos.org // // Copyright 2015 Oslo and Akershus University College of Applied Sciences // and Alfred Bratterud // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // ...
```c++ // This file is a part of the IncludeOS unikernel - www.includeos.org // // Copyright 2015 Oslo and Akershus University College of Applied Sciences // and Alfred Bratterud // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // ...
74cbd426-7862-4d32-86f1-b528bda4f75f
{ "language": "C++" }
```c++ //======================================================================= // Copyright Baptiste Wicht 2011. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) //==============================================...
```c++ //======================================================================= // Copyright Baptiste Wicht 2011. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) //==============================================...
a44d64c8-f8c9-4a75-a033-39961062c3ac
{ "language": "C++" }
```c++ // This code is based on Sabberstone project. // Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva // RosettaStone is hearthstone simulator using C++ with reinforcement learning. // Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon #include <Rosetta/Cards/Cards.hpp> #include <Rosetta/Ta...
```c++ // This code is based on Sabberstone project. // Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva // RosettaStone is hearthstone simulator using C++ with reinforcement learning. // Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon #include <Rosetta/Cards/Cards.hpp> #include <Rosetta/Ta...
34f9800d-5590-4b8f-9c58-d29e677864dd
{ "language": "C++" }
```c++ // Copyright eeGeo Ltd (2012-2015), All Rights Reserved #include "WatermarkDataFactory.h" namespace ExampleApp { namespace Watermark { namespace View { WatermarkDataFactory::WatermarkDataFactory(const std::string& appName, ...
```c++ // Copyright eeGeo Ltd (2012-2015), All Rights Reserved #include "WatermarkDataFactory.h" namespace ExampleApp { namespace Watermark { namespace View { WatermarkDataFactory::WatermarkDataFactory(const std::string& appName, ...
0b1dcd71-5bb3-4a0d-8ea7-07b66e6f1bae
{ "language": "C++" }
```c++ #include <bts/blockchain/address.hpp> #include <fc/crypto/elliptic.hpp> #include <iostream> int main( int argc, char** argv ) { if( argc == 1 ) { auto key = fc::ecc::private_key::generate(); std::cout << "private key: " << std::string( key.get_secret() ) <<"\n"; std::c...
```c++ #include <bts/blockchain/address.hpp> #include <fc/crypto/elliptic.hpp> #include <fc/io/json.hpp> #include <fc/reflect/variant.hpp> #include <fc/filesystem.hpp> #include <iostream> int main( int argc, char** argv ) { if( argc == 1 ) { auto key = fc::ecc::private_key::generate(); std::cout << ...
23bc09fe-79a8-4b73-a8bd-919119fd4d49
{ "language": "C++" }
```c++ #include "elapsedtimer.h" ElapsedTimer::ElapsedTimer(QObject* parent) : QObject(parent) { connect(&_interval, &QTimer::timeout, this, [=] () { emit timeElapsed(_elapsed.elapsed()); }); } qint64 ElapsedTimer::elapsed() { if (_elapsed.isValid()) { return _elapsed.elapsed(); } ...
```c++ #include "elapsedtimer.h" ElapsedTimer::ElapsedTimer(QObject* parent) : QObject(parent) { connect(&_interval, &QTimer::timeout, this, [=] () { emit timeElapsed(_elapsed.elapsed()); }); } qint64 ElapsedTimer::elapsed() { if (_elapsed.isValid()) { return _elapsed.elapsed(); } ...
5a848cfe-6f9c-4166-b141-0569de649b0a
{ "language": "C++" }
```c++ #include <string> #include <ccspec/expectation/unexpected_throw.h> namespace ccspec { namespace expectation { using std::string; UnexpectedThrow::UnexpectedThrow(const std::exception& cause) : cause_(cause) {} string UnexpectedThrow::toString() { return string("Unexpected exception: ") + cause_.what(...
```c++ #include <string> #include <ccspec/expectation/unexpected_throw.h> namespace ccspec { namespace expectation { using std::exception; using std::string; UnexpectedThrow::UnexpectedThrow(const exception& cause) : cause_(cause) {} string UnexpectedThrow::toString() { return string("Unexpected exception: ...
4941a9d5-f818-4ce6-a3a9-3a41532cd3ee
{ "language": "C++" }
```c++ // Includes. #include "UI/mainwindow.h" #include "App/App.h" // Qt. #include <QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); App app; MainWindow w(&app); w.setMinimumSize(640, 480); w.show(); app.setUI(&w); return a.exec(); } ``` Set MainWindow as...
```c++ // Includes. #include "UI/mainwindow.h" #include "App/App.h" // Qt. #include <QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); App app; MainWindow w(&app); w.setMinimumSize(640, 480); w.show(); app.setUI(&w); app.setDelegate(&w); return a.exec();...
0e7fd0c6-68c1-4bd3-951d-b8b5da0c44ca
{ "language": "C++" }
```c++ /* * Copyright 2002 California Institute of Technology */ #include "cantera/IdealGasMix.h" #include "cantera/equilibrium.h" #include "cantera/thermo/IdealSolnGasVPSS.h" #include "cantera/thermo/ThermoFactory.h" using namespace std; using namespace Cantera; int main(int argc, char** argv) { #ifdef _MSC_VER ...
```c++ /* * Copyright 2002 California Institute of Technology */ #include "cantera/IdealGasMix.h" #include "cantera/equilibrium.h" #include "cantera/thermo/IdealSolnGasVPSS.h" #include "cantera/thermo/ThermoFactory.h" using namespace std; using namespace Cantera; int main(int argc, char** argv) { #ifdef _MSC_VER ...
f0095c9b-fef6-4fa1-abd0-9dda910c1cbb
{ "language": "C++" }
```c++ #include <qpiekey.h> #include <QSizePolicy> #include <QPainter> #include <QPaintEvent> QPieKey::QPieKey(QWidget *parent) : QWidget(parent) { bitmap = new QBitmap(40,40); QPainter painter(bitmap); bitmap->clear(); painter.drawEllipse(0, 0, 40, 40); setFixedSize(40, 40); setMask(*bitmap);...
```c++ #include <qpiekey.h> #include <QSizePolicy> #include <QPainter> #include <QPaintEvent> #define SIZE 60 QPieKey::QPieKey(QWidget *parent) : QWidget(parent) { bitmap = new QBitmap(SIZE*2,SIZE*2); QPainter painter(bitmap); setFixedSize(SIZE*2, SIZE*2); bitmap->clear(); painter.setBrush(Qt::c...
919ee43d-58d7-484c-82f0-4fd79ccd5581
{ "language": "C++" }
```c++ #include <cstring> #include <iostream> #include <string> using namespace std; int main(int argc, const char* argv[]) { // Print help if (argc == 1 || strcmp(argv[0], "--help") == 0) { cout << "GLSLPreprocessor is a simple preprocessor for GLSL files." << endl << "Usage:" << endl ...
```c++ #include <cstring> #include <iostream> #include <string> #include <fstream> using namespace std; int main(int argc, const char* argv[]) { // Print help if (argc == 1 || strcmp(argv[0], "--help") == 0) { cout << "GLSLPreprocessor is a simple preprocessor for GLSL files." << endl << ...
18d0747a-bac5-4cc2-9471-8cf00bdc160d
{ "language": "C++" }
```c++ #include "gtest/gtest.h" #include "paxos/messages.hpp" TEST(MessageTest, testMessageResponseUpdatesSenderAndReceiver) { Replica from("from_hostname"); Replica to("to_hostname"); Decree the_decree(from, 1, "", DecreeType::UserDecree); Message m(the_decree, from, to, MessageType::RequestMessage...
```c++ #include "gtest/gtest.h" #include "paxos/messages.hpp" TEST(MessageTest, testMessageResponseUpdatesSenderAndReceiver) { Replica from("from_hostname"); Replica to("to_hostname"); Decree the_decree(from, 1, "", DecreeType::UserDecree); Message m(the_decree, from, to, MessageType::RequestMessage...
6a7c8c81-13aa-40fc-8849-865df8395090
{ "language": "C++" }
```c++ #include <iostream> using namespace std; #define out if(1)cout #define min(a,b) (((a)<(b))?(a):(b)) #define max(a,b) (((a)>(b))?(a):(b)) #define abs(a) (((a)<0)?(-(a)):(a)) static const int MAXN = 10000001; typedef long long int i64; static i64 ar[MAXN]; int main() { int N, M; cin >> N >> M; for (int i...
```c++ #include <iostream> using namespace std; #define out if(1)cout #define min(a,b) (((a)<(b))?(a):(b)) #define max(a,b) (((a)>(b))?(a):(b)) #define abs(a) (((a)<0)?(-(a)):(a)) static const int MAXN = 10000001; typedef long long int i64; static i64 ar[MAXN]; int main() { ios::sync_with_stdio(false); int N, ...
06640f38-c1b7-4519-934a-33d658f9b90d
{ "language": "C++" }
```c++ /** * Copyright © 2017 IBM Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
```c++ /** * Copyright © 2017 IBM Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
f034888b-d4b3-4aca-8ecd-241b3d690c27
{ "language": "C++" }
```c++ /* * TimeStamp.cpp * * Copyright 2001, LifeLine Networks BV (www.lifeline.nl). All rights reserved. * Copyright 2001, Bastiaan Bakker. All rights reserved. * * See the COPYING file for the terms of usage and distribution. */ #include <log4cpp/TimeStamp.hh> #include <cstring> #ifdef LOG4CPP_HAVE_GETTIME...
```c++ /* * TimeStamp.cpp * * Copyright 2001, LifeLine Networks BV (www.lifeline.nl). All rights reserved. * Copyright 2001, Bastiaan Bakker. All rights reserved. * * See the COPYING file for the terms of usage and distribution. */ #include <log4cpp/TimeStamp.hh> #include <cstring> #ifdef LOG4CPP_HAVE_GETTIME...
aa213ea7-c71a-4209-9efd-15578b119461
{ "language": "C++" }
```c++ #include "Foo.hh" #include <string> #include <iostream> #define EXPORT __attribute__((visibility("default"))) EXPORT int Foo::PrintFoo() { std::cout << "This is in a C++ in a dynamically linked framework!" << std::endl; return 1; } ``` Add logging to show c++ environment.
```c++ #include "Foo.hh" #include <string> #include <iostream> #define EXPORT __attribute__((visibility("default"))) EXPORT int Foo::PrintFoo() { #if __cplusplus std::cout << "C++ environment detected." << std::endl; #endif std::cout << "Foo::PrintFoo() called." << std::endl; return 1; } ```
11849f40-1ee8-475d-8a4b-1c70509f6e30
{ "language": "C++" }
```c++ #include <cucumber-cpp/internal/connectors/wire/WireServer.hpp> namespace cucumber { namespace internal { SocketServer::SocketServer(const ProtocolHandler *protocolHandler) : protocolHandler(protocolHandler), ios(), acceptor(ios) { } void SocketServer::listen(const port_type port) { tcp::endpo...
```c++ #include <cucumber-cpp/internal/connectors/wire/WireServer.hpp> namespace cucumber { namespace internal { SocketServer::SocketServer(const ProtocolHandler *protocolHandler) : protocolHandler(protocolHandler), ios(), acceptor(ios) { } void SocketServer::listen(const port_type port) { tcp::endpo...
6a10033b-e864-47d5-b3a1-67c1e3ed5e46
{ "language": "C++" }
```c++ FIXED_TEST("(cat|dog|)\\1", ANCHOR_START, "catcat", true, "catcat", "cat"); FIXED_TEST("(cat|dog|)\\1", ANCHOR_START, "dogdog", true, "dogdog", "dog"); FIXED_TEST("(cat|dog|)\\1", ANCHOR_START, "snek", true, "", ""); FIXED_TEST("(cat|dog|)\\1", ANCHOR_START, "catdog", false); FIXED_TEST("(cat|dog|)\\1", ...
```c++ FIXED_TEST("(cat|dog|)\\1", ANCHOR_START, "catcat", true, "catcat", "cat"); FIXED_TEST("(cat|dog|)\\1", ANCHOR_START, "dogdog", true, "dogdog", "dog"); FIXED_TEST("(cat|dog|)\\1", ANCHOR_START, "snek", true, "", ""); FIXED_TEST("(cat|dog|)\\1", ANCHOR_START, "catdog", false); FIXED_TEST("(cat|dog|)\\1", ...
8ff7d783-284a-478e-9a89-977b7b36fa10
{ "language": "C++" }
```c++ #include "writer/verilog/dataflow_in.h" #include "iroha/i_design.h" #include "iroha/resource_class.h" #include "writer/module_template.h" #include "writer/verilog/insn_writer.h" #include "writer/verilog/module.h" #include "writer/verilog/shared_reg.h" namespace iroha { namespace writer { namespace verilog { D...
```c++ #include "writer/verilog/dataflow_in.h" #include "iroha/i_design.h" #include "iroha/resource_class.h" #include "writer/module_template.h" #include "writer/verilog/insn_writer.h" #include "writer/verilog/module.h" #include "writer/verilog/shared_reg.h" namespace iroha { namespace writer { namespace verilog { D...
4753c45b-303f-439d-a324-fe0315afeb4f
{ "language": "C++" }
```c++ #include "AboutDarkThemePluginDialog.h" #include "ui_AboutDarkThemePluginDialog.h" using namespace libqdark; AboutDarkThemePluginDialog::AboutDarkThemePluginDialog(QWidget* parent) : QDialog(parent) , ui(new Ui::AboutDarkThemePluginDialog) { ui->setupUi(this); //ui->nameLabel->setText(m_ui->na...
```c++ #include "AboutDarkThemePluginDialog.h" #include "ui_AboutDarkThemePluginDialog.h" #include <string> using namespace libqdark; AboutDarkThemePluginDialog::AboutDarkThemePluginDialog(QWidget* parent) : QDialog(parent) , ui(new Ui::AboutDarkThemePluginDialog) { ui->setupUi(this); ui->nameLabel-...
efb1387a-b08c-4f3b-a770-c8a2dc52254e
{ "language": "C++" }
```c++ //#include <iostream> #include SPECIFIC_HEADER int main(int /*argc*/, char** /*argv*/) { unsigned out {}; constexpr unsigned num_runs = 1e7; for (unsigned run_id {} ; run_id != num_runs ; ++run_id) { out += most_significant_position(run_id); } //std::cout << out; bool success = out == unsigned...
```c++ //#include <iostream> #include SPECIFIC_HEADER int main(int /*argc*/, char** /*argv*/) { unsigned out {}; constexpr unsigned num_runs = 10000000; for (unsigned run_id {} ; run_id != num_runs ; ++run_id) { out += most_significant_position(run_id); } //std::cout << out; bool success = out == uns...
2736f0c5-cf05-4e99-bc30-c1b426c40b46
{ "language": "C++" }
```c++ #include "Topology.hpp" #include "Host.hpp" #include "Hop.hpp" using namespace std; /*nmap -oX traceroute_all_subnet.xml -O -sV localhost*/ int main(int argc, char **argv) { if(argc < 1) { cout << "Invalid number of program arguments: "; cout << "Usage ./build_topology <traceroute_file.xml>" << end...
```c++ #include "Topology.hpp" #include "Host.hpp" #include "Hop.hpp" #include <fstream> using namespace std; /*nmap -oX traceroute_all_subnet.xml -O -sV localhost*/ int main(int argc, char **argv) { if(argc < 1) { cout << "Invalid number of program arguments: "; cout << "Usage ./build_topology <tracerout...
1db979ad-80b9-4a87-87bb-a4a560aa85dd
{ "language": "C++" }
```c++ #include <os> #include "../x86_pc/idt.hpp" void __arch_poweroff() { asm("cli; hlt;"); __builtin_unreachable(); } void __platform_init() { // setup CPU exception handlers x86::idt_initialize_for_cpu(0); } // not supported! int64_t __arch_now() { return 0; } void __arch_reboot(){} void __arch_enable_le...
```c++ #include <os> #include "../x86_pc/idt.hpp" void __arch_poweroff() { asm("cli; hlt;"); __builtin_unreachable(); } void __platform_init() { // setup CPU exception handlers x86::idt_initialize_for_cpu(0); } // not supported! int64_t __arch_time_now() noexcept { return 0; } void __arch_reboot(){} void ...
e35d3df8-f62c-45fe-b394-6e95714ff816
{ "language": "C++" }
```c++ #include "primitives.hpp" #include "event.hpp" #include "gen/includes.hpp" namespace rubinius { bool Primitives::unknown_primitive(STATE, VMExecutable* exec, Task* task, Message& msg) { std::cout << "\n"; state->print_backtrace(); std::cout << "Called unbound/invalid primitive: " << *msg.name->to_...
```c++ #include "primitives.hpp" #include "event.hpp" #include "gen/includes.hpp" namespace rubinius { bool Primitives::unknown_primitive(STATE, VMExecutable* exec, Task* task, Message& msg) { std::cout << "\n"; state->print_backtrace(); std::cout << "Called unbound or invalid primitive from: " << *msg.n...
b20b48e4-93aa-4e75-98dd-f9c3318ba86c
{ "language": "C++" }
```c++ #include <Python.h> #include "module_lock.h" #include "classad/classad.h" using namespace condor; pthread_mutex_t ModuleLock::m_mutex = PTHREAD_MUTEX_INITIALIZER; ModuleLock::ModuleLock() : m_release_gil(!classad::ClassAdGetExpressionCaching()), m_owned(false) { acquire(); } void ModuleLock:...
```c++ #include <Python.h> #include "module_lock.h" #include "classad/classad.h" using namespace condor; pthread_mutex_t ModuleLock::m_mutex = PTHREAD_MUTEX_INITIALIZER; ModuleLock::ModuleLock() : m_release_gil(!classad::ClassAdGetExpressionCaching()), m_owned(false), m_save(0) { acquire(); } void ...
a4141a80-7356-4976-8e8c-0aeef75679a0
{ "language": "C++" }
```c++ #include "test.h" #include "vast/util/visitor.h" struct base; struct t1; struct t2; typedef vast::util::const_visitor<base, t1, t2> concrete_visitor; struct base { VAST_ACCEPT(concrete_visitor) VAST_ACCEPT_CONST(concrete_visitor) }; struct t1 : base { VAST_ACCEPT(concrete_visitor) VAST_ACCEPT_CONST(c...
```c++ #include "test.h" #include "vast/util/visitor.h" struct base; struct t1; struct t2; typedef vast::util::const_visitor<base, t1, t2> concrete_visitor; struct base { VAST_ACCEPT(concrete_visitor) VAST_ACCEPT_CONST(concrete_visitor) }; struct t1 : base { VAST_ACCEPT(concrete_visitor) VAST_ACCEPT_CONST(c...
ace9ab1f-0dd7-4bd9-9fc8-27b416638850
{ "language": "C++" }
```c++ // Ensure that we have a quiet startup when we don't have the XRay // instrumentation sleds. // // RUN: %clangxx -std=c++11 %s -o %t %xraylib // RUN: XRAY_OPTIONS="patch_premain=true verbosity=1" %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix NOISY // RUN: XRAY_OPTIONS="patch_premain=true verbosity=0" %...
```c++ // Ensure that we have a quiet startup when we don't have the XRay // instrumentation sleds. // // RUN: %clangxx -std=c++11 %s -o %t %xraylib // RUN: XRAY_OPTIONS="patch_premain=true verbosity=1" %run %t 2>&1 | \ // RUN: FileCheck %s --check-prefix NOISY // RUN: XRAY_OPTIONS="patch_premain=true verbosity=0" %...
4c1adde9-a949-40db-af8d-a5f2ede4a4f6
{ "language": "C++" }
```c++ #include "DoorEntity.h" DoorEntity::DoorEntity() { } DoorEntity::~DoorEntity() { } int DoorEntity::Initialize(int entityID, PhysicsComponent * pComp, GraphicsComponent * gComp) { this->InitializeBase(entityID, pComp, gComp); this->m_isOpened = false; return 0; } int DoorEntity::Update(float dT, InputHa...
```c++ #include "DoorEntity.h" DoorEntity::DoorEntity() { } DoorEntity::~DoorEntity() { } int DoorEntity::Initialize(int entityID, PhysicsComponent * pComp, GraphicsComponent * gComp) { this->InitializeBase(entityID, pComp, gComp); this->m_isOpened = false; return 0; } int DoorEntity::Update(float dT, InputHa...
0ccb13fd-5201-4380-8bb8-e4d8933b02b4
{ "language": "C++" }
```c++ #include <Pith/Config.hpp> #include <Pith/Version.hpp> #include <iostream> extern "C" int pith_main(int argc, char** argv) { std::cout << "Pith version " << Pith::Version::STRING << " " << Pith::Version::COMMIT << std::endl; return 0; } /// When no main is defined, pith defines a main that prints version...
```c++ #include <Pith/Config.hpp> #include <Pith/Version.hpp> #include <iostream> extern "C" auto pith_main([[maybe_unused]] int argc, [[maybe_unused]] char** argv) -> int { std::cout << "Pith version " << Pith::Version::STRING << " " << Pith::Version::COMMIT << std::endl; return 0; } /// When no main is define...
851c06a8-d53e-40fd-bb4d-09193f6a3566
{ "language": "C++" }
```c++ #include <Halide.h> #include <stdio.h> #include <stdlib.h> using namespace Halide; int main() { // This test must be run with an OpenGL target const Target &target = get_jit_target_from_environment(); if (!target.has_feature(Target::OpenGL)) { fprintf(stderr,"ERROR: This test must be run w...
```c++ #include <Halide.h> #include <stdio.h> #include <stdlib.h> using namespace Halide; int main() { // This test must be run with an OpenGL target const Target &target = get_jit_target_from_environment(); if (!target.has_feature(Target::OpenGL)) { fprintf(stderr,"ERROR: This test must be run w...
bd1b72eb-2195-4506-b150-c84993a6215a
{ "language": "C++" }
```c++ // RUN: %clang_cc1 -std=c++17 -verify -emit-llvm-only %s // expected-no-diagnostics template <class T> void bar(const T &t) { foo(t); } template <class> struct HasFriend { template <class T> friend void foo(const HasFriend<T> &m) noexcept(false); }; template <class T> void foo(const HasFriend<T> &m) noex...
```c++ // RUN: %clang_cc1 -std=c++17 -verify -emit-llvm-only %s // expected-no-diagnostics template <class T> void bar(const T &t) { foo(t); } template <class> struct HasFriend { template <class T> friend void foo(const HasFriend<T> &m) noexcept(false); }; template <class T> void foo(const HasFriend<T> &m) noex...
2608848a-1e89-4464-9410-2ae4e64c4178
{ "language": "C++" }
```c++ /* * Copyright 2016 - 2019 gtalent2@gmail.com * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <cstdio> #include "../media.hpp" namespace no...
```c++ /* * Copyright 2016 - 2019 gtalent2@gmail.com * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <fstream> #include <ox/std/trace.hpp> #includ...
4adfa4fa-5963-445d-a614-6dbc44ea9326
{ "language": "C++" }
```c++ #include "catch.hpp" #include "../src/Board.h" TEST_CASE("Board class tests", "[Board]") { SECTION("The constructor properly sets width and height of the board") { const int desired_width = 11; const int desired_height = 12; Board b(desired_width, desired_height); REQUIRE(desired_width == b....
```c++ #include "catch.hpp" #include "../src/Board.h" TEST_CASE("Board class tests", "[Board]") { SECTION("The constructor properly sets width and height of the board") { const int desired_width = 11; const int desired_height = 12; Board b(desired_height, desired_width); REQUIRE(desired_height == b...
dd69517d-a29a-4e56-b9cb-ea5d71c2d1f5
{ "language": "C++" }
```c++ #include <tightdb/row.hpp> #include <tightdb/table.hpp> using namespace std; using namespace tightdb; void RowBase::attach(Table* table, size_t row_ndx) { if (table) { table->register_row_accessor(this); // Throws m_table.reset(table); m_row_ndx = row_ndx; } } void RowBase::re...
```c++ #include <tightdb/row.hpp> #include <tightdb/table.hpp> using namespace std; using namespace tightdb; void RowBase::attach(Table* table, size_t row_ndx) { if (table) { table->register_row_accessor(this); // Throws m_table.reset(table); m_row_ndx = row_ndx; } } void RowBase::re...
2b27ce2c-96b2-4dc8-af24-5d26d1f22f49
{ "language": "C++" }
```c++ // Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/cancellation_flag.h" #include "base/logging.h" namespace base { void CancellationFlag::Set() { #if !defined(NDEBUG) DCHECK(...
```c++ // Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/cancellation_flag.h" #include "base/logging.h" namespace base { void CancellationFlag::Set() { #if !defined(NDEBUG) DCHECK_...
392c7c31-35ad-4318-a8f4-0667f7ceb4c6
{ "language": "C++" }
```c++ #include "SerialCommand.h" #include "anyware_serial.h" void unrecognized(const char *cmd) { printError(F("unrecognized command"), cmd); } /*! RESET [<bool>] */ void reset_action() { char *debugarg = sCmd.next(); bool debug = false; if (debugarg) debug = atoi(debugarg); reset(debug); } /*! IDENTI...
```c++ #include "SerialCommand.h" #include "anyware_serial.h" void unrecognized(const char *cmd) { printError(F("unrecognized command"), cmd); } /*! RESET [<bool>] */ void reset_action() { char *debugarg = sCmd.next(); bool debug = false; if (debugarg) debug = atoi(debugarg); reset(debug); } /*! IDENTI...
c1dddbd0-b3d9-4217-812f-ffd541b8985d
{ "language": "C++" }
```c++ #include "memory.h" namespace EPITOME { template <typename T> Room<T>::Room() {} template <typename T> Room<T>::~Room() { Empty(); } template <typename T> Room<T>::Room(Room&& other) { items = other.items; other.items.clear(); } template<typename T> void Room<T>::Add(T* item) { items.pus...
```c++ #include "memory.h" namespace EPITOME { template <typename T> Room<T>::Room() {} template <typename T> Room<T>::~Room() { Empty(); } template <typename T> Room<T>::Room(Room&& other) { items = other.items; other.items.clear(); } template<typename T> void Room<T>::Add(T* item) { items.pus...
c34bf624-13bd-4eb3-a9e8-928b7ae59f46
{ "language": "C++" }
```c++ #include "core.h" #include "main.h" #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_SUITE(main_tests) BOOST_AUTO_TEST_CASE(subsidy_limit_test) { uint64_t nSum = 0; for (int nHeight = 0; nHeight < 7000000; nHeight += 1000) { uint64_t nSubsidy = GetBlockValue(nHeight, 0); BOOST_CHECK...
```c++ #include "core.h" #include "main.h" #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_SUITE(main_tests) BOOST_AUTO_TEST_CASE(subsidy_limit_test) { uint64_t nSum = 0; for (int nHeight = 0; nHeight < 14000000; nHeight += 1000) { uint64_t nSubsidy = GetBlockValue(nHeight, 0); BOOST_CHEC...
533d6726-612b-4350-8f93-661f21102c94
{ "language": "C++" }
```c++ // Copyright 2014 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "v8.h" #include "function-tester.h" using namespace v8::internal; using namespace v8::internal::compiler; TEST(TurboSimpleDeopt) { ...
```c++ // Copyright 2014 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/v8.h" #include "test/cctest/compiler/function-tester.h" using namespace v8::internal; using namespace v8::internal::compiler; T...
299e4d77-c457-4f3d-acbc-fb4b08cb0468
{ "language": "C++" }
```c++ // Copyright 2013 Intel Corporation. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ozone/ui/desktop_aura/desktop_factory_wayland.h" #include "ozone/ui/desktop_aura/desktop_screen_wayland.h" #include "ozone/ui/desktop_aura/...
```c++ // Copyright 2013 Intel Corporation. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ozone/ui/desktop_aura/desktop_factory_wayland.h" #include "ozone/ui/desktop_aura/desktop_screen_wayland.h" #include "ozone/ui/desktop_aura/...
9b6cd7fc-84a4-4f68-9a97-de922429920d
{ "language": "C++" }
```c++ // // Created by Timo on 18.04.2016. // #include <cmath> #include "fixed_point.h" fixed_point::fixed_point(float x) { q = x * std::pow(2, 16); } fixed_point::operator int() const { return q / std::pow(2, 16); } fixed_point::operator float() const { return q / std::pow(2, 16); } fixed_point abs(f...
```c++ // // Created by Timo on 18.04.2016. // #include <cmath> #include "fixed_point.h" fixed_point::fixed_point(float x) { q = x * std::pow(2, 16); } fixed_point::operator int() const { return q / std::pow(2, 16); } fixed_point::operator float() const { return q / std::pow(2, 16); } fixed_point abs(f...
64a9c387-dc70-4f10-b16d-5f6257545411
{ "language": "C++" }
```c++ #include <QtCore/QCoreApplication> #include "signalwatcher.h" static SignalWatcher* g_instance = 0; SignalWatcher::SignalWatcher(void) : QObject(qApp) { } bool SignalWatcher::watch(int sig) { Q_UNUSED(sig) return false; } bool SignalWatcher::unwatch(int sig) { Q_UNUSED(sig) return false; } SignalWatche...
```c++ #include <QtCore/QCoreApplication> #include "signalwatcher.h" class SignalWatcherPrivate {} static SignalWatcher* g_instance = 0; SignalWatcher::SignalWatcher(void) : QObject(qApp) { } bool SignalWatcher::watch(int sig) { Q_UNUSED(sig) return false; } bool SignalWatcher::unwatch(int sig) { Q_UNUSED(sig)...
58b540b8-b666-4c42-83cd-548968cdd945
{ "language": "C++" }
```c++ #include <Zmey/Components/TransformManager.h> #include <nlohmann/json.hpp> #include <Zmey/Components/ComponentRegistry.h> namespace Zmey { namespace Components { void TransformComponentToBlob(const nlohmann::json& rawJson, IDataBlob& blob) { //float position[3]; //position[0] = rawJson["Posit...
```c++ #include <Zmey/Components/TransformManager.h> #include <nlohmann/json.hpp> #include <Zmey/Components/ComponentRegistry.h> namespace Zmey { namespace Components { void TransformComponentToBlob(const nlohmann::json& rawJson, IDataBlob& blob) { float position[3]; position[0] = rawJson["Position"...
656ae987-56b6-4fc7-99d5-b2850e2af0fe
{ "language": "C++" }
```c++ // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chrome_browser_main_aura.h" #include "base/logging.h" ChromeBrowserMainPartsAura::ChromeBrowserMainPartsAura( co...
```c++ // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chrome_browser_main_aura.h" #include "base/logging.h" ChromeBrowserMainPartsAura::ChromeBrowserMainPartsAura( co...
fecc4187-59d8-4e15-815d-beeed9221755
{ "language": "C++" }
```c++ #define BOOST_ERROR_CODE_HEADER_ONLY #include <Combaseapi.h> #include <boost/system/error_code.hpp> ``` Remove (unnecessary) win32 only header.
```c++ #define BOOST_ERROR_CODE_HEADER_ONLY #include <boost/system/error_code.hpp> ```
6bedbacb-02d6-4958-9e0e-c2800f44c29e
{ "language": "C++" }
```c++ /* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkNullCanvas.h" #include "SkCanvas.h" #include "SKNWayCanvas.h" SkCanvas* SkCreateNullCanvas() { // An N-Way canvas forwards calls to N canvas's. When ...
```c++ /* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkNullCanvas.h" #include "SkCanvas.h" #include "SKNWayCanvas.h" SkCanvas* SkCreateNullCanvas() { // An N-Way canvas forwards calls to N canvas's. When ...
52a7091e-7e1b-4364-bfb6-69be4dce3ff5
{ "language": "C++" }
```c++ #include "mytablemodel.h" int MyTableModel::rowCount(const QModelIndex &parent) const { return m_data.size(); } int MyTableModel::columnCount(const QModelIndex &parent) const { return 2; } QVariant MyTableModel::data(const QModelIndex &index, int role) const { Record const& dataElem = m_data[index...
```c++ #include "mytablemodel.h" int MyTableModel::rowCount(const QModelIndex &parent) const { return m_data.size(); } int MyTableModel::columnCount(const QModelIndex &parent) const { return 2; } QVariant MyTableModel::data(const QModelIndex &index, int role) const { Record const& dataElem = m_data[index...
77fe33dc-f0e7-493c-bb97-a599953780b5
{ "language": "C++" }
```c++ #include "perf_precomp.hpp" using namespace std; using namespace cv; using namespace perf; typedef TestBaseWithParam< pair<string, string> > ImagePair; pair<string, string> impair(const char* im1, const char* im2) { return make_pair(string(im1), string(im2)); } PERF_TEST_P(ImagePair, OpticalFlowDual_TVL1...
```c++ #include "perf_precomp.hpp" using namespace std; using namespace cv; using namespace perf; typedef TestBaseWithParam< pair<string, string> > ImagePair; pair<string, string> impair(const char* im1, const char* im2) { return make_pair(string(im1), string(im2)); } PERF_TEST_P(ImagePair, OpticalFlowDual_TVL1...
1112a4de-d87f-4923-ac36-59e5d179f763
{ "language": "C++" }
```c++ #include "stagestack.h" namespace OpenApoc { void StageStack::Push(std::shared_ptr<Stage> newStage) { // Pause any current stage if(this->Current()) this->Current()->Pause(); this->Stack.push(newStage); newStage->Begin(); } std::shared_ptr<Stage> StageStack::Pop() { std::shared_ptr<Stage> result = t...
```c++ #include "stagestack.h" namespace OpenApoc { void StageStack::Push(std::shared_ptr<Stage> newStage) { // Pause any current stage if(this->Current()) this->Current()->Pause(); this->Stack.push(newStage); newStage->Begin(); } std::shared_ptr<Stage> StageStack::Pop() { std::shared_ptr<Stage> result = t...
97b0253d-3670-46ca-a0bb-7ae249780e04
{ "language": "C++" }
```c++ // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "testing/gtest/include/gtest/gtest.h" #include "third_party/WebKit/WebKit/chromium/public/WebView.h" #include "webkit/tools/test_...
```c++ // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "testing/gtest/include/gtest/gtest.h" #include "third_party/WebKit/WebKit/chromium/public/WebView.h" #include "webkit/tools/test_...
a604472e-4b04-44d2-9d2c-2071220e508d
{ "language": "C++" }
```c++ // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/at_exit.h" #include "base/command_line.h" #include "base/test/test_timeouts.h" #include "mojo/application/application_runner_chromiu...
```c++ // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/at_exit.h" #include "base/command_line.h" #include "base/test/test_timeouts.h" #include "mojo/application/application_runner_chromiu...
ca6af258-80b0-4ba9-b55f-6c26b8be7065
{ "language": "C++" }
```c++ // Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/renderer/renderer_logging.h" #include "base/logging.h" #include "googleurl/src/gurl.h" namespace renderer_logging { // Sets...
```c++ // Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/renderer/renderer_logging.h" #include "base/logging.h" #include "googleurl/src/gurl.h" namespace renderer_logging { // Sets...
b109fbf9-d37b-449b-86e3-00877efa5bb8
{ "language": "C++" }
```c++ #include "photoeffects.hpp" #include "stdio.h" using namespace cv; int tint(InputArray src, OutputArray dst, const Vec3b &colorTint, float density) { CV_Assert(src.type() == CV_8UC3); CV_Assert(density >= 0.0f && density <= 1.0f); dst.create(src.size(), CV_8UC3); Mat image = src.getMat...
```c++ #include "photoeffects.hpp" #include "stdio.h" using namespace cv; int tint(InputArray src, OutputArray dst, const Vec3b &colorTint, float density) { CV_Assert(src.type() == CV_8UC3); CV_Assert(density >= 0.0f && density <= 1.0f); dst.create(src.size(), CV_8UC3); Mat image = src.getMat...
a36bb904-5555-4b8c-97cd-66109731e7c7
{ "language": "C++" }
```c++ #include "RedisClient.h" #include <string> #include <iostream> using namespace std; int main(int argc, char** argv) { (void)argc; (void)argv; REDIS_ENDPOINT endpoints[1] = { { "127.0.0.1", 6379 }, //{ "127.0.0.1", 6380 }, //{ "127.0.0.1", 6381 }, }; REDIS_CONFIG ...
```c++ #include "RedisClient.h" #include <string> #include <iostream> using namespace std; int main(int argc, char** argv) { (void)argc; (void)argv; REDIS_ENDPOINT endpoints[1] = { { "127.0.0.1", 6379 }, //{ "127.0.0.1", 6380 }, //{ "127.0.0.1", 6381 }, }; REDIS_CONFIG ...
b11b0c7e-5f5a-4da7-8472-bb2bba2d0d02
{ "language": "C++" }
```c++ #include <string> #include <map> #include "CalController.h" #include "TEMLogger.h" BOOST_LOG_INLINE_GLOBAL_LOGGER_INIT(my_cal_logger, severity_channel_logger_t) { return severity_channel_logger_t(keywords::channel = "CALIB"); } severity_channel_logger_t& CalController::clg = my_cal_logger::get(); std::stri...
```c++ #include <string> #include <map> #include "CalController.h" #include "TEMLogger.h" BOOST_LOG_INLINE_GLOBAL_LOGGER_INIT(my_cal_logger, severity_channel_logger_t) { return severity_channel_logger_t(keywords::channel = "CALIB"); } severity_channel_logger_t& CalController::clg = my_cal_logger::get(); std::stri...
c581931a-4c91-400e-a71a-22553cb0f486
{ "language": "C++" }
```c++ #include "test_env.h" #include "TMP102.h" #if defined(TARGET_KL25Z) TMP102 temperature(PTC9, PTC8, 0x90); #elif defined(TARGET_LPC812) TMP102 temperature(D10, D11, 0x90); #elif defined(TARGET_LPC4088) TMP102 temperature(p9, p10, 0x90); #elif defined(TARGET_LPC2368) TMP102 temperature(p28, p27, 0x90); #else ...
```c++ #include "test_env.h" #include "TMP102.h" #if defined(TARGET_KL25Z) TMP102 temperature(PTC9, PTC8, 0x90); #elif defined(TARGET_LPC812) TMP102 temperature(D10, D11, 0x90); #elif defined(TARGET_LPC4088) TMP102 temperature(p9, p10, 0x90); #elif defined(TARGET_LPC2368) TMP102 temperature(p28, p27, 0x90); #elif ...
e4695e99-0465-491b-be8a-34ceeebc6265
{ "language": "C++" }
```c++ /* * Copyright © 2017 Collabora Ltd. * * This file is part of vkmark. * * vkmark is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation, either * version 2.1 of the License, or (at your option) a...
```c++ /* * Copyright © 2017 Collabora Ltd. * * This file is part of vkmark. * * vkmark is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation, either * version 2.1 of the License, or (at your option) a...
7bb8389e-39ea-401c-8cc8-1f7984b4d9eb
{ "language": "C++" }
```c++ #include "drivers/ublox_neo7.hpp" #include "chprintf.h" #include "unit_config.hpp" void UBloxNEO7::init() { } GPSReading UBloxNEO7::readGPS() { GPSReading reading; // Read all available bytes until the newline character. std::size_t len = readUntil('\n'); // Check if a full line is ready to be proce...
```c++ #include "drivers/ublox_neo7.hpp" #include "chprintf.h" #include "unit_config.hpp" void UBloxNEO7::init() { } GPSReading UBloxNEO7::readGPS() { GPSReading reading; // Read all available bytes until the newline character. NMEA dictates that // messages should end with a CRLF, but we'll only look for the...
e356b6bb-2dbe-4acd-a5c7-04203e75c4ad
{ "language": "C++" }
```c++ /* * Copyright (c) 2016 Luke San Antonio * All rights reserved. * * This file provides the implementation for the engine's C interface, * specifically tailored for LuaJIT's FFI facilities. */ #include "redcrane.hpp" namespace redc { struct Model_Visitor : boost::static_visitor<glm::mat4> { glm::m...
```c++ /* * Copyright (c) 2016 Luke San Antonio * All rights reserved. * * This file provides the implementation for the engine's C interface, * specifically tailored for LuaJIT's FFI facilities. */ #include "redcrane.hpp" namespace redc { struct Model_Visitor : boost::static_visitor<glm::mat4> { glm::m...
d60d2f10-9678-4987-a98a-f31a7749129b
{ "language": "C++" }
```c++ // torch4microscopic.cpp : R\[ AvP[ṼGg |Cg`܂B // #include "stdafx.h" int main(int argc, char* argv[]) { return 0; } ``` Add for processing command line option.
```c++ // torch4microscopic.cpp : R\[ AvP[ṼGg |Cg`܂B // #include "stdafx.h" #include <iostream> #include <vector> #include <fstream> #include <boost/program_options.hpp> using namespace std; using namespace boost::program_options; int main(int argc, char* argv[]) { //IvV` options_description inout_options("path...
ba6f30d7-4ba0-45dc-9501-352d1a0a3224
{ "language": "C++" }
```c++ // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/aura/toplevel_window_container.h" #include "base/utf_string_conversions.h" #include "ui/aura/toplevel_window_event_filter.h" nam...
```c++ // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/aura/toplevel_window_container.h" #include "base/utf_string_conversions.h" #include "ui/aura/toplevel_window_event_filter.h" nam...
8f9ce2fe-b395-43fe-98f3-3fb063fd0ad5
{ "language": "C++" }
```c++ /*------------------------------------------------------------------------- * Vulkan CTS Framework * -------------------- * * Copyright (c) 2018 The Khronos Group Inc. * Copyright (c) 2019 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file ex...
```c++ /*------------------------------------------------------------------------- * Vulkan CTS Framework * -------------------- * * Copyright (c) 2018 The Khronos Group Inc. * Copyright (c) 2019 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file ex...
4f3d392a-ae36-49e6-a719-fef003ceb0d2
{ "language": "C++" }
```c++ // RUN: %clang -emit-llvm -g -S %s -o - | FileCheck %s struct X { X(int v); int value; }; X::X(int v) { // CHECK_TEMPORARILY_DISABLED: call void @_ZN1XC2Ei(%struct.X* %this1, i32 %tmp), !dbg // TEMPORARY CHECK: X value = v; } ``` Make this test darwin only.
```c++ // RUN: %clang -march=x86_64-apple-darwin10 -emit-llvm -g -S %s -o - | FileCheck %s struct X { X(int v); int value; }; X::X(int v) { // CHECK: call void @_ZN1XC2Ei(%struct.X* %this1, i32 %tmp), !dbg value = v; } ```
ce6b23f6-f902-413d-942e-1a65cdb32f1c
{ "language": "C++" }
```c++ #include <cstdint> #include <APU.h> static int null_dmc_reader(void*, unsigned int) { return 0x55; // causes dmc sample to be flat } APU::APU() { time = 0; frameLength = 29780; apu.dmc_reader(null_dmc_reader, NULL); apu.output(&buf); buf.clock_rate(1789773); buf.sample_rate(96000); } void APU::setDmcC...
```c++ #include <cstdint> #include <APU.h> static int null_dmc_reader(void*, unsigned int) { return 0x55; // causes dmc sample to be flat } APU::APU() { time = 0; frameLength = 29780; apu.dmc_reader(null_dmc_reader, NULL); apu.output(&buf); buf.clock_rate(1789773); buf.sample_rate(44100); } void APU::setDmcC...
a3f91b61-26f7-4dd7-8e67-e14520a92f81
{ "language": "C++" }
```c++ // // (C) Jan de Vaan 2007-2010, all rights reserved. See the accompanying "License.txt" for licensed use. // #include "gettime.h" // for best accuracy, getTime is implemented platform dependent. // to avoid a global include of windows.h, this is a separate file. #if defined(_WIN32) #include <windows.h> //...
```c++ // // (C) Jan de Vaan 2007-2010, all rights reserved. See the accompanying "License.txt" for licensed use. // #include "gettime.h" // for best accuracy, getTime is implemented platform dependent. // to avoid a global include of windows.h, this is a separate file. #if defined(_WIN32) #include <windows.h> //...
b4a8cb4e-c927-43d3-bb88-a8fd277d2618
{ "language": "C++" }
```c++ /** * $ g++ solution.cpp && ./a.out < input.txt */ #include <iostream> #include <string> #include <sstream> using namespace std; /** * O(n^2) word-by-word comparison */ bool validate_line(string line) { string input1, input2; stringstream stream1(line); int counter1 = 0; while (stream1 >> ...
```c++ /** * $ g++ solution.cpp && ./a.out < input.txt */ #include <iostream> #include <string> #include <sstream> using namespace std; /** * O(n^2) word-by-word comparison */ bool part1_validate(string line) { string input1, input2; stringstream stream1(line); int counter1 = 0; while (stream1 >>...
9ee0178e-e817-4294-beea-1fa53ff4e6f3
{ "language": "C++" }
```c++ // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chrome_browser_main_aura.h" #include "base/logging.h" ChromeBrowserMainPartsAura::ChromeBrowserMainPartsAura( co...
```c++ // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chrome_browser_main_aura.h" #include "base/logging.h" ChromeBrowserMainPartsAura::ChromeBrowserMainPartsAura( co...
c49adb0a-aedc-4615-a9f3-0dcab3a1e289
{ "language": "C++" }
```c++ #include "hiker.hpp" #define BOOST_TEST_MODULE HikerTest #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_CASE(Life_the_universe_and_everything) { // The initial code and test files are completely // *unrelated* to the chosen exercise. They are // merely a simple example to start you off. // ...
```c++ #include "hiker.hpp" #define BOOST_TEST_MODULE HikerTest #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_CASE(Life_the_universe_and_everything) { // The initial code and test files are completely // *unrelated* to the chosen exercise. They are // merely a simple example to start you off. // ...
2b804065-b8b1-4d77-a1dc-1ab27239f7d3
{ "language": "C++" }
```c++ ``` Add a stub for the quadratic_sieve(...) procedure.
```c++ #include <assert.h> #include <stdio.h> #include "utility.h" #include "quadraticsieve.h" void quadratic_sieve(long long& result, long long input, int& err) { } ```
91f7a9ed-56c7-4278-b3b8-05f3aee4d6bf
{ "language": "C++" }
```c++ //===-- project_euler/Problem5.cpp ------------------------------*- C++ -*-===// // // ProjectEuler.net solutions by Will Mitchell // // This file is distributed under the MIT License. See LICENSE for details. // //===----------------------------------------------------------------------===// /// /// \class proj...
```c++ //===-- project_euler/Problem5.cpp ------------------------------*- C++ -*-===// // // ProjectEuler.net solutions by Will Mitchell // // This file is distributed under the MIT License. See LICENSE for details. // //===----------------------------------------------------------------------===// /// /// \class proj...
353250c7-1500-48c9-affb-5d0e295438c7
{ "language": "C++" }
```c++ // Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/common/chrome_paths.h" #include "chrome/test/ui_test_utils.h" #includ...
```c++ // Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/common/chrome_paths.h" #include "chrome/test/ui_test_utils.h" #includ...
a3419233-ab06-4249-8cdc-649061a2d090
{ "language": "C++" }
```c++ // Copyright 2016 Mitchell Kember. Subject to the MIT License. // Project Euler: Problem 44 // Coded triangle numbers namespace problem_44 { long nth_pentagonal_number(const long n) { return n * (3 * n - 1) / 2; } bool is_pentagonal(const long n) { const long limit = n / 2 + 1; const long two_n = n * 2; f...
```c++ // Copyright 2016 Mitchell Kember. Subject to the MIT License. // Project Euler: Problem 44 // Coded triangle numbers #include <cstdio> #include <cmath> namespace problem_44 { long nth_pentagonal_number(const long n) { return n * (3 * n - 1) / 2; } bool is_pentagonal(const long n) { const long limit = n / ...
c42fb14e-1044-45ea-82db-4fbe0c90f0f4
{ "language": "C++" }
```c++ /****************************************************************************** * The MIT License (MIT) * * Copyright (c) 2016-2017 Baldur Karlsson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to dea...
```c++ /****************************************************************************** * The MIT License (MIT) * * Copyright (c) 2016-2017 Baldur Karlsson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to dea...
13b915f4-0bfd-43a6-a861-9a235092d0d2
{ "language": "C++" }
```c++ //===-- MSP430MCAsmInfo.cpp - MSP430 asm properties -----------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===------------------------------------------------...
```c++ //===-- MSP430MCAsmInfo.cpp - MSP430 asm properties -----------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===------------------------------------------------...
6a3f46f5-76f7-4384-b1bd-52b3d8d243fc
{ "language": "C++" }
```c++ // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "sandbox/linux/seccomp-bpf/trap.h" #include <signal.h> #include "sandbox/linux/tests/unit_tests.h" #include "testing/gtest/include/gtest...
```c++ // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "sandbox/linux/seccomp-bpf/trap.h" #include <signal.h> #include "sandbox/linux/tests/unit_tests.h" #include "testing/gtest/include/gtest...
d620da06-e970-4ca2-9a7c-8ef2c0eda257
{ "language": "C++" }
```c++ /**************************************************************************** * Copyright (c) 2012-2019 by the DataTransferKit authors * * All rights reserved. * * * ...
```c++ /**************************************************************************** * Copyright (c) 2012-2019 by the DataTransferKit authors * * All rights reserved. * * * ...
9796eedd-91c3-4e40-b2ca-cc19aaff2018
{ "language": "C++" }
```c++ //Some useful equations int main(){ //area portion of a circle A = pi*r^2 * (theta/(2*pi)) //area chord of a circle A = R * R * acos((R - h)/R) - (R - h) * sqrt(2 * R * h - h * h) // h is the height of the chord } ``` Add rotation matrix , clockwise and counterclockwise.
```c++ //Some useful equations int main(){ //area portion of a circle A = pi*r^2 * (theta/(2*pi)) //area chord of a circle A = R * R * acos((R - h)/R) - (R - h) * sqrt(2 * R * h - h * h) // h is the height of the chord h = R - hypot(x,y) // rotation matrix counnterclockwise [x' y'] = [[cost -sint] [sint...
b6de1032-2a98-4b60-8aee-b76132f55580
{ "language": "C++" }
```c++ // This file is a part of the OpenSurgSim project. // Copyright 2013, SimQuest LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE...
```c++ // This file is a part of the OpenSurgSim project. // Copyright 2013, SimQuest LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE...
0857f31f-5e04-4497-a576-7ef4d94782ef
{ "language": "C++" }
```c++ /* * Copyright (c) 2014 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
```c++ /* * Copyright (c) 2014 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
739d7e2e-157e-42d2-af03-a9d664ff9c1a
{ "language": "C++" }
```c++ // Test that -Weverything does not trigger any backend remarks. // // This was triggering backend remarks for which there were no frontend // flags to filter them. The handler in BackendConsumer::DiagnosticHandlerImpl // should not emitting diagnostics for unhandled kinds. // RUN: %clang -c -Weverything -O0 -o ...
```c++ // Test that -Weverything does not trigger any backend remarks. // // This was triggering backend remarks for which there were no frontend // flags to filter them. The handler in BackendConsumer::DiagnosticHandlerImpl // should not emitting diagnostics for unhandled kinds. // RUN: %clang -c -S -Weverything -O0 ...
86ff65e3-7827-479a-a5a9-260055712303
{ "language": "C++" }
```c++ #include "agent_based_epidemic_sim/util/records.h" namespace abesim { constexpr int kReadFlag = O_RDONLY; constexpr int kWriteFlag = O_CREAT | O_WRONLY; riegeli::RecordReader<RiegeliBytesSource> MakeRecordReader( absl::string_view filename) { return riegeli::RecordReader<RiegeliBytesSource>( std::...
```c++ #include "agent_based_epidemic_sim/util/records.h" namespace abesim { constexpr int kReadFlag = O_RDONLY; constexpr int kWriteFlag = O_CREAT | O_WRONLY; riegeli::RecordReader<RiegeliBytesSource> MakeRecordReader( absl::string_view filename) { return riegeli::RecordReader(RiegeliBytesSource(filename, kRe...
b5a89264-0d88-4030-9cff-a3092bb8a2f4
{ "language": "C++" }
```c++ /** * \file * \brief chip::lowLevelInitialization() implementation for STM32L0 * * \author Copyright (C) 2017 Cezary Gapinski cezary.gapinski@gmail.com * * \par License * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not * distributed with t...
```c++ /** * \file * \brief chip::lowLevelInitialization() implementation for STM32L0 * * \author Copyright (C) 2017 Cezary Gapinski cezary.gapinski@gmail.com * * \par License * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not * distributed with t...
bc43c080-4150-42ff-a248-323986b4dfcd
{ "language": "C++" }
```c++ // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/history/history_publisher.h" #include "base/utf_string_conversions.h" namespace history { const char* const Hi...
```c++ // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/history/history_publisher.h" #include "base/utf_string_conversions.h" namespace history { const char* const Hi...
b965685a-72cd-4d96-9f8f-a5ab49d3a8fb
{ "language": "C++" }
```c++ // Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <tao/pegtl.hpp> #include <tao/pegtl/contrib/json.hpp> #include <tao/pegtl/contrib/trace2.hpp> namespace pegtl = TAO_PEGTL_NAMESPACE; using grammar = pegtl::must< peg...
```c++ // Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <tao/pegtl.hpp> #include <tao/pegtl/contrib/json.hpp> #include <tao/pegtl/contrib/trace2.hpp> namespace pegtl = TAO_PEGTL_NAMESPACE; using grammar = pegtl::must< peg...
fe6826d2-f673-461e-9571-3f645e3f00e8
{ "language": "C++" }
```c++ // RUN: rm -rf %t // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t/modules.cache \ // RUN: -I %S/Inputs/odr_hash-Friend \ // RUN: -emit-obj -o /dev/null \ // RUN: -fmodules \ // RUN: -fimplicit-module-maps \ // RUN: -fmodules-cache-path=%t/modules.cache \ // RUN: -std=c++11 -x c++ %s -verify // expec...
```c++ // RUN: rm -rf %t // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t/modules.cache \ // RUN: -I %S/Inputs/odr_hash-Friend \ // RUN: -emit-obj -o /dev/null \ // RUN: -fmodules \ // RUN: -fimplicit-module-maps \ // RUN: -fmodules-cache-path=%t/modules.cache \ // RUN: -std=c++11 -x c++ %s -verify // UNSUP...
ff4ace57-90fa-42d7-af18-d336717e0594
{ "language": "C++" }
```c++ #include "stdafx.h" #include "UserTypeToString.h" UserTypeToString::UserTypeToString(std::string name, int age, double netWorth) : name(name), age(age), netWorth(netWorth) { } UserTypeToString::~UserTypeToString() { } std::ostream& operator<<(std::ostream& os, const UserTypeToString& obj) { // write obj ...
```c++ #include "stdafx.h" #include "UserTypeToString.h" UserTypeToString::UserTypeToString(std::string name, int age, double netWorth) : name(name), age(age), netWorth(netWorth) { } UserTypeToString::~UserTypeToString() { } /* when streaming an instance of this type to an ostream of any kind this function will bui...
bea95f80-d9ef-4dcc-bf6f-4f614eedc91a
{ "language": "C++" }
```c++ //===-- RISCVTargetInfo.cpp - RISCV Target Implementation -----------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===------------------------------------------------...
```c++ //===-- RISCVTargetInfo.cpp - RISCV Target Implementation -----------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===------------------------------------------------...
532080ef-edfd-41c6-840c-fd104027e147
{ "language": "C++" }
```c++ // When we link a binary without the -debug flag, ASan should print out VAs // instead of RVAs. The frames for main and do_uaf should be above 0x400000, // which is the default image base of an executable. // RUN: rm -f %t.pdb // RUN: %clangxx_asan -c -O2 %s -o %t.obj // RUN: link /nologo /OUT:%t.exe %t.obj %as...
```c++ // When we link a binary without the -debug flag, ASan should print out VAs // instead of RVAs. The frames for main and do_uaf should be above 0x400000, // which is the default image base of an executable. // RUN: rm -f %t.pdb // RUN: %clangxx_asan -c -O2 %s -o %t.obj // RUN: link /nologo /OUT:%t.exe %t.obj %as...
dc90bb24-80a1-4d69-afe4-71bdd918fd07
{ "language": "C++" }
```c++ #include "../lib/shared_mem.hpp" #include <iostream> std::shared_ptr<cs477::shm_pool> pool; std::shared_ptr<cs477::bounded_queue<cs477::message, 1024>> rq_queue; std::shared_ptr<cs477::bounded_queue<cs477::message, 1024>> rp_queue; int main(int argc, char **argv) { pool = std::make_shared<cs477::shm_pool>(); ...
```c++ #include "../lib/shared_mem.hpp" #include <iostream> const int PROCESS_COUNT = 3; std::shared_ptr<cs477::shm_pool> pool; std::shared_ptr<cs477::bounded_queue<cs477::message, 1024>> rq_queue; std::shared_ptr<cs477::bounded_queue<cs477::message, 1024>> rp_queue; int main(int argc, char **argv) { pool = std::ma...
cb466402-cd6b-440d-b24d-890e1ca53b39
{ "language": "C++" }
```c++ /* RTcmix - Copyright (C) 2000 The RTcmix Development Team See ``AUTHORS'' for a list of contributors. See ``LICENSE'' for the license to this software and for a DISCLAIMER OF ALL WARRANTIES. */ #include "../sys/mixerr.h" extern "C" double checkInsts(char*, double*, short); extern "C" { double rtdispa...
```c++ /* RTcmix - Copyright (C) 2000 The RTcmix Development Team See ``AUTHORS'' for a list of contributors. See ``LICENSE'' for the license to this software and for a DISCLAIMER OF ALL WARRANTIES. */ #include <prototypes.h> #include "../sys/mixerr.h" extern "C" { double rtdispatch(char *fname, double *pp, ...
2a27001d-aef6-4c8b-8e30-6546597a7211
{ "language": "C++" }
```c++ #include <wtl/string.hpp> #include <wtl/exception.hpp> #include <iostream> int main() { std::cout << "__cplusplus: " << __cplusplus << std::endl; WTL_ASSERT((wtl::split("a b\tc") == std::vector<std::string>{"a", "b", "c"})); WTL_ASSERT((wtl::split<int>("1 2\t3") == std::vector<int>{1, 2, 3})); ...
```c++ #include <wtl/string.hpp> #include <wtl/exception.hpp> #include <iostream> void test_sto() { WTL_ASSERT(wtl::sto<bool>("1")); WTL_ASSERT(wtl::sto<int>("42") == 42); WTL_ASSERT(wtl::sto<long>("1729") == 1729l); WTL_ASSERT(wtl::sto<long long>("24601") == 24601ll); WTL_ASSERT(wtl::sto<unsigned...
fcf0d940-b1a5-4aa6-8f96-85fe1d92310b
{ "language": "C++" }
```c++ #include "llvm/runner.hpp" Runner::Runner(CompileVisitor::Link v): v(v) { llvm::InitializeNativeTarget(); llvm::InitializeNativeTargetAsmPrinter(); llvm::InitializeNativeTargetAsmParser(); std::string onError = ""; auto eb = new llvm::EngineBuilder(std::unique_ptr<llvm::Module>(v->getModule())); ...
```c++ #include "llvm/runner.hpp" Runner::Runner(CompileVisitor::Link v): v(v) { llvm::InitializeNativeTarget(); llvm::InitializeNativeTargetAsmPrinter(); llvm::InitializeNativeTargetAsmParser(); std::string onError = ""; auto eb = new llvm::EngineBuilder(std::unique_ptr<llvm::Module>(v->getModule())); ...
1d6bed9c-1f1c-4d38-92b4-147ea141504a
{ "language": "C++" }
```c++ /* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwave.com/) * * You may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * If any of ...
```c++ /* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwave.com/) * * You may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * If any of ...
f54f6a91-3c82-4c73-833b-7e1b9813d094
{ "language": "C++" }
```c++ // Check that stores in signal handlers are not recorded in origin history. // This is, in fact, undesired behavior caused by our chained origins // implementation being not async-signal-safe. // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -m64 -O3 %s -o %t && \ // RUN: not %run %t >%t.out 2>&1 // ...
```c++ // Check that stores in signal handlers are not recorded in origin history. // This is, in fact, undesired behavior caused by our chained origins // implementation being not async-signal-safe. // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -m64 -O3 %s -o %t && \ // RUN: not %run %t >%t.out 2>&1 // ...