Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using std/stl type_traits instead of boost with XLibs.Net/Additional/qls.hpp #111

Open
wants to merge 2 commits into
base: cmake
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "stdafx.h"
#include "teundomanager.h"
#include <boost/utility.hpp>
#include <iterator>

bool TEUndoManager::Bunch::addAction(TEUndoManager::Action const& action)
Expand Down
4 changes: 2 additions & 2 deletions Source/TriggerEditor/TEEngine/UndoManager/TEUndoManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

#include <list>
#include <utility>
#include <boost/function.hpp>
#include <function>

class TEUndoManager
{
public:
typedef boost::function0<bool> Action;
typedef std::function<bool()> Action;
private:
typedef std::pair<Action, Action> DOREDOPair;
typedef std::list<DOREDOPair> DOREDOContainer;
Expand Down
14 changes: 7 additions & 7 deletions XLibs.Net/Additional/qls.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#define ACHILLES_H_

#include <algorithm>
#include <boost/type_traits.hpp>
#include <iterator>
#include <type_traits>

namespace Loki
{
Expand Down Expand Up @@ -66,18 +66,18 @@ namespace qls
Iter find(Iter from, Iter to, const ValueType& val)
{
typedef std::iterator_traits<Iter>::iterator_category Category;
enum { isBidir = boost::is_same<
enum { isBidir = std::is_same<
Category, std::bidirectional_iterator_tag>::value };
enum { isRand = boost::is_same<
enum { isRand = std::is_same<
Category, std::random_access_iterator_tag>::value };
typedef std::iterator_traits<Iter>::pointer PointerType;
typedef boost::remove_pointer<PointerType>::type
typedef std::remove_pointer<PointerType>::type
IteratedType;

enum { isMutableSeq = !boost::is_const<
enum { isMutableSeq = !std::is_const<
IteratedType>::value };
typedef std::iterator_traits<Iter>::value_type ValueType;
enum { isPod = boost::is_POD<ValueType>::value };
enum { isPod = std::is_pod<ValueType>::value };
enum { selector =
(isBidir || isRand) && isPod && isMutableSeq ? 2 :
(isRand ? 1 : 0) };
Expand All @@ -100,4 +100,4 @@ namespace qls
}
}

#endif
#endif