⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pool_construct.m4

📁 CGAL is a collaborative effort of several sites in Europe and Israel. The goal is to make the most i
💻 M4
字号:
m4_dnlm4_dnl Copyright (C) 2000 Stephen Clearym4_dnlm4_dnl This file can be redistributed and/or modified under the terms foundm4_dnl  in "copyright.html"m4_dnl This software and its documentation is provided "as is" without express orm4_dnl  implied warranty, and with no claim as to its suitability for any purpose.m4_dnlm4_dnl See http://www.boost.org for updates, documentation, and revision history.m4_dnlm4_dnlm4_dnlm4_dnl Avoid the use of any m4_* identifiers in this header file,m4_dnl  as that may cause incompatibility problems with futurem4_dnl  versions of m4.m4_dnlm4_dnl This is a normal header file, except that lines startingm4_dnl  with `m4_dnl' will be stripped, TBA_FORm4_dnl  macros will be replaced with repeated text, and text inm4_dnl  single quotes (`...') will have their single quotesm4_dnl  stripped.m4_dnlm4_dnlm4_dnl Check to make sure NumberOfArguments was defined.  If it's not defined,m4_dnl  default to 3m4_dnlm4_ifdef(`NumberOfArguments', , `m4_errprint(m4___file__:m4___line__`: NumberOfArguments is not defined; defaulting to 3')m4_define(`NumberOfArguments', 3)')m4_dnlm4_ifelse(NumberOfArguments, , `m4_errprint(m4___file__:m4___line__`: NumberOfArguments is defined to be empty; defaulting to 3')m4_define(`NumberOfArguments', 3)')m4_dnlm4_dnlm4_dnl Check to make sure NumberOfArguments >= 1.  If it's not, then fatal error.m4_dnlm4_ifelse(m4_eval(NumberOfArguments < 1), 1, `m4_errprint(m4___file__:m4___line__`: NumberOfArguments ('NumberOfArguments`) is less than 1')m4_m4exit(1)')m4_dnlm4_dnlm4_dnl Include the BOOST_M4_FOR macro definitionm4_dnlm4_include(`for.m4')`'m4_dnlm4_dnlm4_dnl Begin the generated file.m4_dnl// Copyright (C) 2000 Stephen Cleary//// This file can be redistributed and/or modified under the terms found//  in "copyright.html"// This software and its documentation is provided "as is" without express or//  implied warranty, and with no claim as to its suitability for any purpose.//// See http://www.boost.org for updates, documentation, and revision history.m4_dnl These warnings apply to the file generated from this file.m4_dnl Of course, you may freely edit this file.// This file was AUTOMATICALLY GENERATED from "m4___file__"//  Do NOT include directly!//  Do NOT edit!m4_dnlm4_dnl First we define a simple 'cv_qual' macro which takes a number, eitherm4_dnl   0, 1, 2, or 3, and determines cv-qualification.m4_dnlm4_define(`cv_qual',`m4_ifelse($1, 0, `',`m4_ifelse($1, 1, `const ',`m4_ifelse($1, 2, `volatile ',`m4_ifelse($1, 3, `const volatile ',`m4_errprint(m4___file__:m4___line__: `Boost m4 script: cv-determiner: Not 0, 1, 2, or 3 (was '$1`)')')')')')')m4_dnlm4_dnlm4_dnl Next we go through the actual loop.  For each number of arguments fromm4_dnl   1 to NumberOfArguments, we create a template function that takes thatm4_dnl   many template arguments, and also generate all cv-qualified permutationsm4_dnl   of that function.m4_dnlBOOST_M4_FOR(N, 1, NumberOfArguments + 1,`BOOST_M4_FOR(cv, 0, m4_eval(4 ** N),  `template <BOOST_M4_FOR(i, 0, N, `typename T`'i', `, ')>element_type * construct(BOOST_M4_FOR(i, 0, N,    `cv_qual(m4_eval((cv >> (i * 2)) % 4))T`'i & a`'i', `, ')){  element_type * const ret = malloc();  if (ret == 0)    return ret;  try { new (ret) element_type(BOOST_M4_FOR(i, 0, N, `a`'i', `, ')); }  catch (...) { free(ret); throw; }  return ret;}')')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -