zookeeper-cpp
ZooKeeper Client for C++
string_view.hpp
Go to the documentation of this file.
1 
5 #pragma once
6 
7 #include <zk/config.hpp>
8 
13 #ifndef ZKPP_STRING_VIEW_USE_STD_EXPERIMENTAL
14 # define ZKPP_STRING_VIEW_USE_STD_EXPERIMENTAL 0
15 #endif
16 
17 #ifndef ZKPP_STRING_VIEW_USE_CUSTOM
18 # define ZKPP_STRING_VIEW_USE_CUSTOM 0
19 #endif
20 
21 #ifndef ZKPP_STRING_VIEW_USE_STD
22 # if ZKPP_STRING_VIEW_USE_STD_EXPERIMENTAL || ZKPP_STRING_VIEW_USE_CUSTOM
23 # define ZKPP_STRING_VIEW_USE_STD 0
24 # else
25 # define ZKPP_STRING_VIEW_USE_STD 1
26 # endif
27 #endif
28 
29 #if ZKPP_STRING_VIEW_USE_STD
30 # define ZKPP_STRING_VIEW_INCLUDE <string_view>
31 # define ZKPP_STRING_VIEW_TYPE std::string_view
32 #elif ZKPP_STRING_VIEW_USE_STD_EXPERIMENTAL
33 # define ZKPP_STRING_VIEW_INCLUDE <experimental/string_view>
34 # define ZKPP_STRING_VIEW_TYPE std::experimental::string_view
35 #elif ZKPP_STRING_VIEW_USE_CUSTOM
36 # if !defined ZKPP_STRING_VIEW_INCLUDE || !defined ZKPP_STRING_VIEW_TYPE
37 # error "When ZKPP_STRING_VIEW_USE_CUSTOM is set, you must also define ZKPP_STRING_VIEW_INCLUDE and"
38 # error "ZKPP_STRING_VIEW_TYPE."
39 # endif
40 #else
41 # error "Unknown type to use for zk::string_view"
42 #endif
43 
44 #include ZKPP_STRING_VIEW_INCLUDE
45 
46 namespace zk
47 {
48 
49 using string_view = ZKPP_STRING_VIEW_TYPE;
50 
51 }
52 
Definition: acl.cpp:8