meryngii.neta

今日も新たな"ネタ"を求めて。

conceptでのエラー

andLinux上でのConceptGCCのmakeに挫折したので、結局Cygwin上で試すことになった。
ものすごくコンパイルが長いけど、テスト版だからしょうがない。

#include <algorithm>

int main()
{
	std::sort(1, 2, 3); // ここでエラー
}
conceptg++ -o test test.cpp

なかなか簡潔なエラーを吐いてくれた。

test.cpp: In function 'int main()':
test.cpp:6: error: no matching function for call to 'sort(int, int, int)'
/opt/conceptgcc-4.3.0-alpha-7/lib/gcc/i686-pc-cygwin/4.3.0/../../../../include/c

    1. /4.3.0/bits/stl_algo.h:2708: note: candidates are: void std::sort(_Iter, _Iter

, _Compare) [with _Iter = int, _Compare = int]
test.cpp:6: note: no concept map for requirement 'std::RandomAccessIterator'

なかなか読みやすい。