]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/quickbook/test/unit/symbols_find_null.cpp
1 /*=============================================================================
2 Copyright (c) 2004 Joao Abecasis
3 http://spirit.sourceforge.net/
5 Use, modification and distribution is subject to the Boost Software
6 License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 http://www.boost.org/LICENSE_1_0.txt)
8 =============================================================================*/
10 #include <boost/spirit/include/classic_scanner.hpp>
11 #include <boost/utility/addressof.hpp>
12 #include "symbols.hpp"
14 typedef char char_type
;
15 typedef char const* iterator
;
17 char_type data_
[] = "whatever";
19 iterator begin
= data_
;
22 sizeof(data_
) / sizeof(char_type
); // Yes, this is an intentional bug ;)
26 typedef BOOST_SPIRIT_CLASSIC_NS::scanner
<> scanner
;
27 typedef quickbook::tst
<void*, char_type
> symbols
;
31 symbols_
.add(begin
, end
- 1, (void*)boost::addressof(symbols_
));
33 // The symbol table parser should not choke on input containing the null
35 symbols_
.find(scanner(begin
, end
));