티스토리 뷰
동영상 처럼 이쁘게 되지 않는다. 정식으로 반영될때 까지 대기
CppCon 2015: Eric Niebler "Ranges for the Standard Library"
먼가 이리저리 달라졌는데 어케해야하나 해맸다
range-v3 안에 example에 예제가 그대로 존재하더라
cygwin/clang 은 컴파일이 잘안되고,
VS도 몇 step 가다보면 equality 쪽에서 에러 왕창;
1>test.cpp(25,12): error C2672: 'operator __surrogate_func': no matching overloaded function found
1>test.cpp(25,25): error C7602: 'ranges::views::iota_fn::operator ()': the associated constraints are not satisfied
1>range-v3\include\range\v3\view\iota.hpp(453): message : see declaration of 'ranges::views::iota_fn::operator ()'
1>Done building project "Sample-Test3.vcxproj" -- FAILED.
동영상의 concept check 매크로는 바뀌었고, incrementable은 range안에 존재
#include <range/v3/iterator/concept.hpp>
CPP_assert(incrementable);
template<typename I>
CPP_concept_bool weakly_incrementable =
semiregular<I> &&
CPP_fragment(ranges::weakly_incrementable_, I) &&
CPP_requires ((I) i) //
(
++i,
i++,
concepts::requires_<same_as<I&, decltype(++i)>>
);
template<typename I>
CPP_concept_bool incrementable =
regular<I> && weakly_incrementable<I> &&
CPP_requires ((I) i) //
(
concepts::requires_<same_as<I, decltype(i++)>>
);
동영상의 예제처럼 이쁘게 나오진 않지만
1>test.cpp(37,1): error C2338: Concept assertion failed : incrementable<date>
1>test.cpp(53,12): error C2672: 'operator __surrogate_func': no matching overloaded function found
1test.cpp(53,25): error C7602: 'ranges::views::iota_fn::operator ()': the associated constraints are not satisfied
1>range-v3\include\range\v3\view\iota.hpp(453): message : see declaration of 'ranges::views::iota_fn::operator ()'
1>Done building project "Sample-Test3.vcxproj" -- FAILED.
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크