当前位置: 首页>>代码示例>>C++>>正文


C++ date_type::as_special方法代码示例

本文整理汇总了C++中date_type::as_special方法的典型用法代码示例。如果您正苦于以下问题:C++ date_type::as_special方法的具体用法?C++ date_type::as_special怎么用?C++ date_type::as_special使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在date_type的用法示例。


在下文中一共展示了date_type::as_special方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: put

 OutItrT put(OutItrT next,
             std::ios_base& a_ios,
             char_type fill_char,
             const date_type& d) const
 {
   if (d.is_special()) {
     return do_put_special(next, a_ios, fill_char, d.as_special());
   }
   //The following line of code required the date to support a to_tm function
   return do_put_tm(next, a_ios, fill_char, to_tm(d), m_format);
 }
开发者ID:imos,项目名称:icfpc2015,代码行数:11,代码来源:date_facet.hpp

示例2: date_put

 //! Put date into an ostream
 static void date_put(const date_type& d,
                      ostream_type& os,
                      const facet_type& f)
 {
   special_values sv = d.as_special();
   if (sv == not_special) {
     ymd_type ymd = d.year_month_day();
     ostream_ymd_formatter<ymd_type, facet_type, charT>::ymd_put(ymd, os, f);
   }
   else { // output a special value
     std::ostreambuf_iterator<charT> coi(os);
     f.put_special_value(coi, sv);
   }
 }
开发者ID:BalticPinguin,项目名称:libmesh,代码行数:15,代码来源:date_formatting_locales.hpp


注:本文中的date_type::as_special方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。