Last active
March 25, 2018 09:10
-
-
Save loliGothicK/0e2586c9693d989e00d216fdab1c8287 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <type_traits> | |
#include <utility> | |
#include <iterator> | |
template < class Range > | |
func(Range&& range) | |
-> std::enable_if<decltype(std::begin(std::declval<typename std::decay<Range>::type>()) + 2, std::true_type{})> | |
{ | |
// Rangeはランダムラクセスイテレータを持つコンテナなので | |
// ランダムラクセスするアルゴリズムを記述できる | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment