msgpack/cpp/v1_2versioning_8hpp_source.html
2021-08-31 15:12:16 +09:00

151 lines
15 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MessagePack for C++: msgpack/v1/versioning.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MessagePack for C++
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_34fe0060e19d01bea8daf072c0f69c00.html">msgpack</a></li><li class="navelem"><a class="el" href="dir_5aa584ddc247af2b72f60595c4897ede.html">v1</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">versioning.hpp</div> </div>
</div><!--header-->
<div class="contents">
<a href="v1_2versioning_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * MessagePack for C++ version switcher</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * Copyright (C) 2014 KONDO Takatoshi</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Distributed under the Boost Software License, Version 1.0.</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * (See accompanying file LICENSE_1_0.txt or copy at</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * http://www.boost.org/LICENSE_1_0.txt)</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="preprocessor">#ifndef MSGPACK_VERSIONING_HPP</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="preprocessor">#define MSGPACK_VERSIONING_HPP</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="cpp__version_8hpp.html">msgpack/cpp_version.hpp</a>&quot;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160; </div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="preprocessor">#if !defined(MSGPACK_DEFAULT_API_VERSION)</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="v1_2versioning_8hpp.html#af98e476269745d55517695370f82194b"> 16</a></span>&#160;<span class="preprocessor">#define MSGPACK_DEFAULT_API_VERSION 1</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="v1_2versioning_8hpp.html#a5a177574af62b8582b298d5076272862"> 19</a></span>&#160;<span class="preprocessor">#define MSGPACK_DEFAULT_API_NS MSGPACK_DETAIL_PP_CAT(v, MSGPACK_DEFAULT_API_VERSION)</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; </div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#if MSGPACK_DEFAULT_API_VERSION == 1</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="v1_2versioning_8hpp.html#ae98414d99626c24cfc6a63523ef12b60"> 22</a></span>&#160;<span class="preprocessor">#define MSGPACK_DETAIL_PP_ENABLE_NS_v1 ()</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment">//#elif MSGPACK_DEFAULT_API_VERSION == 2</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment">//#define MSGPACK_DETAIL_PP_ENABLE_NS_v2 ()</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#error</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="v1_2versioning_8hpp.html#a87a36c1d3a099d135f741d53bd11417c"> 29</a></span>&#160;<span class="preprocessor">#define MSGPACK_DETAIL_PP_CAT(a, ...) MSGPACK_DETAIL_PP_PRIMITIVE_CAT(a, __VA_ARGS__)</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="v1_2versioning_8hpp.html#a82d05d93f0102b51ba471c226252965b"> 30</a></span>&#160;<span class="preprocessor">#define MSGPACK_DETAIL_PP_PRIMITIVE_CAT(a, ...) a ## __VA_ARGS__</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; </div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="v1_2versioning_8hpp.html#ae335ed541e3439f3f74db7760bdd11f2"> 32</a></span>&#160;<span class="preprocessor">#define MSGPACK_DETAIL_PP_IIF(c) MSGPACK_DETAIL_PP_PRIMITIVE_CAT(MSGPACK_DETAIL_PP_IIF_, c)</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="v1_2versioning_8hpp.html#a9f43a018610a11c558910201e8971f70"> 33</a></span>&#160;<span class="preprocessor">#define MSGPACK_DETAIL_PP_IIF_0(t, ...) __VA_ARGS__</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="v1_2versioning_8hpp.html#a84b3d3e6dee61e28e347958c5ab8475d"> 34</a></span>&#160;<span class="preprocessor">#define MSGPACK_DETAIL_PP_IIF_1(t, ...) t</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="v1_2versioning_8hpp.html#aebc4101e6bf7741e1738c71bc01f15d4"> 36</a></span>&#160;<span class="preprocessor">#define MSGPACK_DETAIL_PP_PROBE(x) x, 1</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="preprocessor">#if defined(_MSC_VER)</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="preprocessor">#define MSGPACK_DETAIL_PP_MSVC_VA_ARGS_WORKAROUND(define, args) define args</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="preprocessor">#define MSGPACK_DETAIL_PP_CHECK(...) MSGPACK_DETAIL_PP_MSVC_VA_ARGS_WORKAROUND(MSGPACK_DETAIL_PP_CHECK_N, (__VA_ARGS__, 0))</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;<span class="preprocessor">#define MSGPACK_DETAIL_PP_CHECK_N(x, n, ...) n</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; </div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="preprocessor">#else </span><span class="comment">// defined(__MSC_VER)</span></div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="v1_2versioning_8hpp.html#a594a55fa574c078a68c0d56c6db54e47"> 46</a></span>&#160;<span class="preprocessor">#define MSGPACK_DETAIL_PP_CHECK(...) MSGPACK_DETAIL_PP_CHECK_N(__VA_ARGS__, 0)</span></div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="v1_2versioning_8hpp.html#af7cf162c80f93e05a2f27ac6d62c2899"> 47</a></span>&#160;<span class="preprocessor">#define MSGPACK_DETAIL_PP_CHECK_N(x, n, ...) n</span></div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; </div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// defined(__MSC_VER)</span></div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; </div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="v1_2versioning_8hpp.html#a68654281c8ed9028e790aca4ad304c7e"> 52</a></span>&#160;<span class="preprocessor">#define MSGPACK_DETAIL_PP_NS_ENABLED_PROBE(ns) MSGPACK_DETAIL_PP_NS_ENABLED_PROBE_PROXY( MSGPACK_DETAIL_PP_ENABLE_NS_##ns )</span></div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="v1_2versioning_8hpp.html#ae6fdf507f494d4030d51e70f0ead40df"> 53</a></span>&#160;<span class="preprocessor">#define MSGPACK_DETAIL_PP_NS_ENABLED_PROBE_PROXY(...) MSGPACK_DETAIL_PP_NS_ENABLED_PROBE_PRIMIVIE(__VA_ARGS__)</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="v1_2versioning_8hpp.html#ad784fa3f8096e55223f656852ef38c7b"> 54</a></span>&#160;<span class="preprocessor">#define MSGPACK_DETAIL_PP_NS_ENABLED_PROBE_PRIMIVIE(x) MSGPACK_DETAIL_PP_NS_ENABLED_PROBE_COMBINE_ x</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="v1_2versioning_8hpp.html#a502f4c6b511d85437655a243ccb92ed0"> 55</a></span>&#160;<span class="preprocessor">#define MSGPACK_DETAIL_PP_NS_ENABLED_PROBE_COMBINE_(...) MSGPACK_DETAIL_PP_PROBE(~)</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="v1_2versioning_8hpp.html#a3d8b0a5c6be6d9d471281df94d9030e1"> 57</a></span>&#160;<span class="preprocessor">#define MSGPACK_DETAIL_PP_IS_NS_ENABLED(ns) MSGPACK_DETAIL_PP_CHECK(MSGPACK_DETAIL_PP_NS_ENABLED_PROBE(ns))</span></div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; </div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;<span class="preprocessor">#ifdef MSGPACK_USE_CPP03</span></div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;<span class="preprocessor">#define MSGPACK_API_VERSION_NAMESPACE(ns) MSGPACK_DETAIL_PP_IIF(MSGPACK_DETAIL_PP_IS_NS_ENABLED(ns)) \</span></div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;<span class="preprocessor"> (namespace ns{}; using namespace ns; namespace ns, \</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;<span class="preprocessor"> namespace ns)</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; </div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;<span class="preprocessor">#else </span><span class="comment">// MSGPACK_USE_CPP03</span></div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; </div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="v1_2versioning_8hpp.html#afc7672e6f1fe2324a37d578e787408b8"> 66</a></span>&#160;<span class="preprocessor">#define MSGPACK_API_VERSION_NAMESPACE(ns) MSGPACK_DETAIL_PP_IIF(MSGPACK_DETAIL_PP_IS_NS_ENABLED(ns)) \</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;<span class="preprocessor"> (inline namespace ns, namespace ns)</span></div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// MSGPACK_USE_CPP03</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// MSGPACK_VERSIONING_HPP</span></div>
<div class="ttc" id="acpp__version_8hpp_html"><div class="ttname"><a href="cpp__version_8hpp.html">cpp_version.hpp</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>