1 // 2 // Copyright (c) 2017 James E. King III 3 // Use, modification and distribution is subject to the 4 // Boost Software License, Version 1.0. (See accompanying 5 // file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) 6 // 7 8 #include <boost/core/ignore_unused.hpp> 9 #include <boost/date_time/posix_time/posix_time_duration.hpp> 10 #include <boost/date_time/special_defs.hpp> 11 main()12int main() 13 { 14 using boost::date_time::pos_infin; 15 using boost::posix_time::seconds; 16 boost::ignore_unused(seconds(static_cast<boost::int64_t>(pos_infin))); // compiles: it's an integral 17 boost::ignore_unused(seconds(pos_infin)); // won't compile: not an integral 18 return 1; // return an error if we actually run for some reason 19 } 20