MSVC 19.28.29336.0 throws the following warning when
boost::date_time::gregorian_date is called.
warning C4365: 'initializing': conversion from 'int' to 'unsigned long', signed/unsigned mismatch
warning C4365: const boost::posix_time::ptime Since1970(boost::gregorian::date(1970U, 1U, 1U));
warning C4365: ^
<path>\include\boost\date_time\date.hpp(72,35): message : while evaluating constexpr function 'boost::date_time::gregorian_calendar_base<boost::gregorian::greg_year_month_day,unsigned int>::day_number'
<path>\include\boost\date_time\date.hpp(72,35): message : : days_(calendar::day_number(ymd_type(y, m, d)))
Co-authored-by: timmaraju <keerthi.timmaraju@teamviewer.com>
Without this change the BOOST_CXX14_CONSTEXPR on the constructors has no
effect, as they invoke assign()
Co-authored-by: Jeff Garland <jeff@crystalclearsoftware.com>
C++17 deprecates implicit generation of assignment operator in presence of
explicitly declared copy constructor. In future standards this behavior may
be removed.
In the affected Boost.DateTime classes, the explicitly defined copy
constructors are functionally equivalent to those would be generated
implicitly, so we can just remove them. The additional benefit is that the
implicitly generated ones will have constexpr and noexcept specifications,
and will also allow implicit move constructors and assignment operators.
Also fix Clang -Wextra-semi-stmt and Clang-tidy readability-container-size-empty warnings.
Alphabetical order of STL headers.
Fix some misspellings.
Co-authored-by: Eugene Zelenko <eugene@diakopto.com>
* Change __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost config for the Embarcadero non-clang-based compilers.
* Change BOOST_BORLANDC back to __BORLANDC__ for non-posix functionality.
* Include the header file.
* Inline friend function definitions for exported/imported classes must become declarations and inline definitions outside the class for Embarcadero C++ clang-based compilers. This bug has been reported to Embarcadero.
* Revert "Inline friend function definitions for exported/imported classes must become declarations and inline definitions outside the class for Embarcadero C++ clang-based compilers. This bug has been reported to Embarcadero."
This reverts commit 88e45e951b.
* Inline friend function definitions for exported/imported classes must become declarations and inline definitions outside the class for Embarcadero C++ clang-based compilers. This bug has been reported to Embarcadero.
* Remove separate outside of template class friend functions.
* Define all the friend functions outside the class to conform with the necessity of Embarcadero C++ clang-based compilers that need the friend functions in exported/imported classes to be defined outside the class. This is an Embarcadero C++ clang-based compiler bug which i reported to Embarcadero.
Co-authored-by: Jeff Garland <jeff@crystalclearsoftware.com>
* Changed greg_month and greg_weekday to be not marked as exported/imported.
Both greg_month and greg_weekday classes are implemented completely in headers,
so they need not be marked with BOOST_DATE_TIME_DECL. For consistency with other
similar classes, they are now marked with BOOST_SYMBOL_VISIBLE.
This should fix linking errors on Windows/MSVC, where all members of greg_month
and greg_weekday classes remain unresolved as they are expected to be
implemented in a shared library.
* Enabled shared and static linking in AppVeyor CI.
* Added a test generator for whether all public headers are self-contained.
The generator creates a compile test for every public header, unless
BOOST_DATE_TIME_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS environment variable
is set to 1.
* Only enable self-contained header tests on a few jobs.
There is no point in performing self-contained header tests on every compiler
configuration, so running them only on some saves CI time.
* Make public headers self-contained.
This commit:
- Adds missing includes.
- Adjusts gregorian namespace qualification in a few places to use use
equivalent symbols from date_time and not have to include gregorian
headers.
- Converts tabs to spaces and trims trailing spaces.
This makes the self-contained header tests pass on Linux.
* Move special_value_from_string definition to parsers.hpp.
This resolves different attributes applied to the function definition
in parsers.hpp and greg_month.hpp. The function is now inline and defined
in parsers.hpp.
Also, the commit converts tabs to spaces and trims trailing spaces.
Fixes https://github.com/boostorg/date_time/issues/143.
* Convert tabs to spaces and trim trailing spaces.
* remove legacy to_simple_string and prefer streaming in test code
* driveby fix to clean up self-assign compiler warnings in test code
* driveby fix to clean up unused variable compiler warnings in test code
* another update for issue #123 (constexpr) to allow time_duration constexpr to work
* final updates to make date_time free of library - issue #134
* initial set of core changes for constexpr support (issue #123)
* fixes for constexpr core support based on ci failures (issue #123)
* drive by fix for gcc9.2 warning on polymorphic exception
* fixes for constexpr core support based on for cpp11 and cpp14 build variants (issue #123)
* more fixes for constexpr core support (issue #123) - also fix for issue #124
* next round of changes for constexpr core support (issue #123)
* fix last msvc regression for constexpr core
* driveby fix to remove detail include
* 3rd round of changes for constexpr
* yet another msvc fix for cpp14
* minor doc fix for issue #127 - tm_isddst -> tm_isdst
* minor doc fix for issue #127 - tm_isddst -> tm_isdst
* push constexpr deep into the library including date, ptime (issue #123)
* push constexpr deep into the library including date, ptime (issue #123)
* fix latests regressions from constexpr changes in older gcc
1. is_positive()
- Return boolean value to indicate whether or not time duration is
positive.
2. is_zero()
- Return boolean value to indicate whether or not time duration is
zero.
3. abs()
- Return a time_duration which is the absolute value of time
duration.
Added documentation for these helper functions and improved existing
documentation to indicate constness, return values or static
functions.
Modifying ptime objects by adding and subtracting time durations was
inefficient because it extracted the date and time of day and then
re-constructed a ptime using the date and modified time of day.
This can be avoided by using the existing time_system utilities which
perform the operation by adjusting the number of ticks.
Performance is improved by a factor of 48 on my system.
also added project declarations to jamfiles, added a top level jamfile, and fixed the xmldoc jamfile
also fixed a silent failure y2038 issue in localtime handling and fixed a timezone database parse issue