Skip to content
Merged
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
4 changes: 2 additions & 2 deletions itensor/detail/call_rewrite.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ call_impl(T&& obj, V&& v, long)
return Ret();
}
template <typename Ret, class T, typename V>
stdx::enable_if_t<std::is_same<typename std::result_of<T(V)>::type,void>::value,Ret>
stdx::enable_if_t<std::is_same<std::invoke_result_t<T,V>,void>::value,Ret>
fixret(T&& obj, V&& v, int)
{
call_impl<void,T,V>(std::forward<T>(obj),std::forward<V>(v),0);
Expand Down Expand Up @@ -140,7 +140,7 @@ call_impl(FType&& func, T1&& a1, T2&& a2, long)
return Ret();
}
template <typename Ret, class FType, typename T1, typename T2>
stdx::enable_if_t<std::is_same<typename std::result_of<FType(T1,T2)>::type,void>::value,Ret>
stdx::enable_if_t<std::is_same<std::invoke_result_t<FType,T1,T2>,void>::value,Ret>
fixret(FType&& func, T1&& a1, T2&& a2, int)
{
call_impl<void,FType,T1,T2>(std::forward<FType>(func),
Expand Down
22 changes: 11 additions & 11 deletions itensor/itdata/dotask.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,23 +312,23 @@ struct HasDTHelper
template<typename Task, typename Storage>
struct HasConstDoTask
{
using ResultType = stdx::result_of_t<HasDTHelper<Task,const Storage>()>;
using ResultType = std::invoke_result_t<HasDTHelper<Task,const Storage>>;
bool constexpr static
result() { return ResultType{}; }
};
template<typename Task, typename Storage>
struct HasNonConstDoTask
{
using ResultType = stdx::result_of_t<HasDTHelper<Task,stdx::remove_const_t<Storage>>()>;
using CResultType = stdx::result_of_t<HasDTHelper<Task,const Storage>()>;
using ResultType = std::invoke_result_t<HasDTHelper<Task,stdx::remove_const_t<Storage>>>;
using CResultType = std::invoke_result_t<HasDTHelper<Task,const Storage>>;
bool constexpr static
result() { return ResultType{} && (not CResultType{}); }
};
template<typename Task, typename Storage>
struct HasDoTask
{
using CResultType = stdx::result_of_t<HasDTHelper<Task,const Storage>()>;
using NCResultType = stdx::result_of_t<HasDTHelper<Task,stdx::remove_const_t<Storage>>()>;
using CResultType = std::invoke_result_t<HasDTHelper<Task,const Storage>>;
using NCResultType = std::invoke_result_t<HasDTHelper<Task,stdx::remove_const_t<Storage>>>;
using ResultType = stdx::conditional_t<CResultType::value,
CResultType,
NCResultType>;
Expand Down Expand Up @@ -372,23 +372,23 @@ struct HasDTHelper2Arg
template<typename Task, typename D1, typename D2>
struct HasConstDoTask2Arg
{
using ResultType = stdx::result_of_t<HasDTHelper2Arg<Task,const D1, const D2>()>;
using ResultType = std::invoke_result_t<HasDTHelper2Arg<Task,const D1, const D2>>;
bool constexpr static
result() { return ResultType{}; }
};
template<typename Task, typename D1, typename D2>
struct HasNonConstDoTask2Arg
{
using ResultType = stdx::result_of_t<HasDTHelper2Arg<Task,stdx::remove_const_t<D1>,D2>()>;
using CResultType = stdx::result_of_t<HasDTHelper2Arg<Task,const D1,D2>()>;
using ResultType = std::invoke_result_t<HasDTHelper2Arg<Task,stdx::remove_const_t<D1>,D2>>;
using CResultType = std::invoke_result_t<HasDTHelper2Arg<Task,const D1,D2>>;
bool constexpr static
result() { return ResultType{} && (not CResultType{}); }
};
template<typename Task, typename D1, typename D2>
struct HasDoTask2Arg
{
using CResultType = stdx::result_of_t<HasDTHelper2Arg<Task,const D1,D2>()>;
using NCResultType = stdx::result_of_t<HasDTHelper2Arg<Task,stdx::remove_const_t<D1>,D2>()>;
using CResultType = std::invoke_result_t<HasDTHelper2Arg<Task,const D1,D2>>;
using NCResultType = std::invoke_result_t<HasDTHelper2Arg<Task,stdx::remove_const_t<D1>,D2>>;
using ResultType = stdx::conditional_t<CResultType::value,
CResultType,
NCResultType>;
Expand Down Expand Up @@ -422,7 +422,7 @@ struct HasEvaluate
{ return testEvalImpl(stdx::select_overload{},*s); }
};
bool constexpr static
result() { return stdx::result_of_t<Test()>{}; }
result() { return std::invoke_result_t<Test>{}; }
};

/////////////
Expand Down
2 changes: 1 addition & 1 deletion itensor/itdata/returntype.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ struct TestRet
template<typename Task, typename TList>
struct GetRType : GetRType<Task,popFront<TList>>
{
using Test = stdx::result_of_t<TestRet<Task,frontType<TList>>()>;
using Test = std::invoke_result_t<TestRet<Task,frontType<TList>>>;
using Parent = GetRType<Task,popFront<TList>>;
using RType = stdx::conditional_t<not std::is_same<Test,NoneType>::value,
Test,
Expand Down
2 changes: 1 addition & 1 deletion itensor/itdata/task_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ using ApplyIT_result_of = decltype(resultTypeHelper<T>(std::declval<ApplyIT<F>>(
///////////////////


template<typename F, typename T = typename std::result_of<F()>::type>
template<typename F, typename T = typename std::invoke_result_t<F>>
struct GenerateIT
{
F& f;
Expand Down
2 changes: 1 addition & 1 deletion itensor/util/itertools.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace triqs::utility {

/********************* Transform Iterator ********************/

template <typename Iter, typename L, typename Value = std::result_of<L(typename std::iterator_traits<Iter>::value_type)>>
template <typename Iter, typename L, typename Value = std::invoke_result_t<L,typename std::iterator_traits<Iter>::value_type>>
struct transform_iter : iterator_facade<transform_iter<Iter, L>, Value> {

Iter it;
Expand Down
3 changes: 0 additions & 3 deletions itensor/util/stdx.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ using conditional_t = typename std::conditional<B,T1,T2>::type;
template<bool B, typename T1, typename T2>
using conditional_t = typename std::conditional<B,T1,T2>::type;

template<class T>
using result_of_t = typename std::result_of<T>::type;

template<typename... Conds>
struct all
{
Expand Down
2 changes: 1 addition & 1 deletion sample/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ trg-g: mkdebugdir .debug_objs/trg.o $(ITENSOR_GLIBS) $(TENSOR_HEADERS)
ctmrg: ctmrg.o $(ITENSOR_LIBS) $(TENSOR_HEADERS)
$(CCCOM) $(CCFLAGS) ctmrg.o -o ctmrg $(LIBFLAGS)

ctmrg-g: mkdebugdir .debug_objs/trg.o $(ITENSOR_GLIBS) $(TENSOR_HEADERS)
ctmrg-g: mkdebugdir .debug_objs/ctmrg.o $(ITENSOR_GLIBS) $(TENSOR_HEADERS)
$(CCCOM) $(CCGFLAGS) .debug_objs/ctmrg.o -o ctmrg-g $(LIBGFLAGS)

hubbard_2d: hubbard_2d.o $(ITENSOR_LIBS) $(TENSOR_HEADERS)
Expand Down