1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 // template<class NotAnIterator>
12 // struct iterator_traits
18 #include "test_macros.h"
20 struct not_an_iterator
28 struct two
{char lx
; char lxx
;};
29 template <class U
> static two
test(...);
30 template <class U
> static char test(typename
U::value_type
* = 0);
32 static const bool value
= sizeof(test
<T
>(0)) == 1;
37 typedef std::iterator_traits
<not_an_iterator
> It
;
38 static_assert(!(has_value_type
<It
>::value
), "");