This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "gtest/gtest.h" | |
using namespace testing; | |
class ConfigurableEventListener : public TestEventListener | |
{ | |
protected: | |
TestEventListener* eventListener; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef PATH_CONTRACTS_H_2018_08_20_17_14_18_238_H | |
#define PATH_CONTRACTS_H_2018_08_20_17_14_18_238_H | |
#include <memory> | |
#include <type_traits> | |
#include <utility> | |
#include <filesystem> | |
namespace nitro { | |
namespace file_system { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*============================================================================= | |
Copyright (c) 2006 Joel de Guzman | |
gil_renderer: an AGG renderer using GIL | |
Use, modification and distribution is subject to 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) | |
=============================================================================*/ | |
#ifndef AGG_GIL_RENDERER_INCLUDED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.reddit.com/r/cpp/comments/5p3mob/implementing_function_view_is_harder_than_you/ | |
#include <type_traits> | |
#include <utility> | |
//=== function_ref ===// | |
namespace detail | |
{ | |
template <typename Returned, typename Required> | |
struct compatible_return_type | |
: std::integral_constant<bool, std::is_void<Required>::value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <functional> | |
#include <type_traits> | |
#include <memory> | |
#include <thread> | |
#include <atomic> | |
#include <mutex> | |
#include <condition_variable> | |
#include <future> | |
#define ENABLE_IF(...) \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct hidden_window { | |
hidden_window(HINSTANCE instance, WPARAM message_id = WM_USER + 1000) | |
: wnd{::CreateWindowW(L"STATIC", L"", 0, 0, 0, 0, 0, HWND_MESSAGE, nullptr, instance, nullptr)} | |
, msg_id{message_id} | |
{ | |
::SetWindowLongPtrW(wnd, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(procedure)); | |
} | |
static LRESULT procedure(HWND handle, UINT message, WPARAM wParam, LPARAM lParam) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO: replace to std::function + std::bind | |
template< class AbstractClass,class IdType = size_t, class MakeType = boost::function< typename std::remove_pointer<AbstractClass>::type*()> > | |
class Factory | |
{ | |
using abstract_type = typename std::remove_pointer<AbstractClass>::type; | |
boost::container::flat_map<IdType,MakeType> factory_map; | |
public: | |
void register_factory(IdType type_id,const MakeType& make) | |
{ | |
factory_map.insert(std::make_pair(type_id,make)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef AS_LITERAL_CONST_H_2018_08_24_13_51_51_019_H | |
#define AS_LITERAL_CONST_H_2018_08_24_13_51_51_019_H | |
#include <boost/utility/string_ref.hpp> | |
#include <boost/assert.hpp> | |
// based on this discussion | |
// https://groups.google.com/forum/#!msg/boost-developers-archive/dg7Ma2gK3zk/JZW4Jt-AAioJ | |
// BOOST will never provide this feature, following reason: | |
// const char s[] = {'0', '1', '2', '\0', '\1'}; // User knows that this has fixed size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef 2018_08_29_11_35_23_277_H | |
#define 2018_08_29_11_35_23_277_H | |
#include <boost/config.hpp> | |
#include <boost/concept_check.hpp> | |
#include <type_traits> | |
namespace test { | |
// for compile-time checks | |
namespace concepts { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// library wrapper aroung http functions (WinInet, curl etc) | |
class http_backend; | |
// could be expanded/updated | |
enum class object_type { | |
file, | |
folder, | |
user, | |
site | |
}; |