Refactor folder structure
This commit is contained in:
parent
f30bec26ee
commit
e346283b0b
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#ifndef MESSMER_CPP_UTILS_POINTER_H_
|
||||
#define MESSMER_CPP_UTILS_POINTER_H_
|
||||
#ifndef MESSMER_CPP_UTILS_POINTER_CAST_H_
|
||||
#define MESSMER_CPP_UTILS_POINTER_CAST_H_
|
||||
|
||||
#include <memory>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#ifndef MESSMER_CPP_UTILS_OPTIONALOWNERSHIPPOINTER_H_
|
||||
#define MESSMER_CPP_UTILS_OPTIONALOWNERSHIPPOINTER_H_
|
||||
#ifndef MESSMER_CPP_UTILS_POINTER_OPTIONALOWNERSHIPPOINTER_H_
|
||||
#define MESSMER_CPP_UTILS_POINTER_OPTIONALOWNERSHIPPOINTER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <functional>
|
@ -1,10 +1,11 @@
|
||||
#ifndef MESSMER_CPP_UTILS_UNIQUE_REF_H
|
||||
#define MESSMER_CPP_UTILS_UNIQUE_REF_H
|
||||
#pragma once
|
||||
#ifndef MESSMER_CPP_UTILS_POINTER_UNIQUE_REF_H
|
||||
#define MESSMER_CPP_UTILS_POINTER_UNIQUE_REF_H
|
||||
|
||||
#include <memory>
|
||||
#include <boost/optional.hpp>
|
||||
#include "macros.h"
|
||||
#include "pointer.h"
|
||||
#include "../macros.h"
|
||||
#include "cast.h"
|
||||
|
||||
namespace cpputils {
|
||||
|
||||
@ -55,8 +56,8 @@ private:
|
||||
unique_ref(std::unique_ptr<T> target): _target(std::move(target)) {}
|
||||
template<typename U, typename... Args> friend unique_ref<U> make_unique_ref(Args&&... args);
|
||||
template<typename U> friend boost::optional<unique_ref<U>> nullcheck(std::unique_ptr<U> ptr);
|
||||
template<typename DST, typename SRC> friend boost::optional<unique_ref<DST>> dynamic_pointer_move(unique_ref<SRC> &source);
|
||||
template<typename U> friend class unique_ref;
|
||||
template<typename DST, typename SRC> friend boost::optional<unique_ref<DST>> dynamic_pointer_move(unique_ref<SRC> &source);
|
||||
template<typename U> friend std::unique_ptr<U> to_unique_ptr(unique_ref<U> ref);
|
||||
|
||||
std::unique_ptr<T> _target;
|
@ -1,5 +1,6 @@
|
||||
#ifndef CRYFS_UNIQUE_REF_BOOST_OPTIONAL_GTEST_WORKAROUND_H
|
||||
#define CRYFS_UNIQUE_REF_BOOST_OPTIONAL_GTEST_WORKAROUND_H
|
||||
#pragma once
|
||||
#ifndef MESSMER_CPP_UTILS_POINTER_UNIQUE_REF_BOOST_OPTIONAL_GTEST_WORKAROUND_H
|
||||
#define MESSMER_CPP_UTILS_POINTER_UNIQUE_REF_BOOST_OPTIONAL_GTEST_WORKAROUND_H
|
||||
|
||||
/**
|
||||
* This is a workaround for using boost::optional<unique_ref<T>> in gtest.
|
@ -1,6 +1,6 @@
|
||||
#include "google/gtest/gtest.h"
|
||||
#include "google/gmock/gmock.h"
|
||||
#include "../pointer.h"
|
||||
#include "../../pointer/cast.h"
|
||||
|
||||
using namespace cpputils;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "google/gtest/gtest.h"
|
||||
#include "../pointer.h"
|
||||
#include "../../pointer/cast.h"
|
||||
|
||||
using namespace cpputils;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "google/gtest/gtest.h"
|
||||
#include "../optional_ownership_ptr.h"
|
||||
#include "../macros.h"
|
||||
#include "../../pointer/optional_ownership_ptr.h"
|
||||
#include "../../macros.h"
|
||||
|
||||
using std::unique_ptr;
|
||||
using std::function;
|
@ -1,5 +1,5 @@
|
||||
#include <google/gtest/gtest.h>
|
||||
#include "../unique_ref.h"
|
||||
#include "../../pointer/unique_ref.h"
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <map>
|
||||
@ -8,8 +8,6 @@
|
||||
|
||||
using namespace cpputils;
|
||||
|
||||
//TODO Add some test cases
|
||||
|
||||
class SomeClass0Parameters {};
|
||||
class SomeClass1Parameter {
|
||||
public:
|
Loading…
Reference in New Issue
Block a user