|
-
February 20th, 2003, 10:34 PM
#1
My solution is correct? (about funtion parameter in STL)
Hi, everyone!
Such are the source codes of STL,
--------
template<class RandomAccessIterator, class T>
RandomAccessIterator binary_search (RandomAccessIterator first,
RandomAccessIterator last,
const T& value,
random_access_iterator_tag) {
// more efficient, but less generic algorithm
}
--------
I found there is a type "random_access_iterator_tag" in the definition
of the function. But there is not related parameter names. I think the
reason is the that fourth parameter is not used in the function, hidden the
parameter name can avoid warning in some compilers.
Am I correct?
Thanks in advance,
Geroge
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|