Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit b14f8ca719.
PrevUpHomeNext
datetime::datetime (4 of 4 overloads)

Constructs a datetime from a local_time_point.

Synopsis
explicit constexpr
datetime(
    datetime::local_time_point tp);
Description

Equivalent to constructing a date from a time_point with the same time_since_epoch() as tp.

Requires C++20 calendar types.

Exception safety

Strong guarantee. Throws on invalid input.

Exceptions

Type

Thrown On

std::out_of_range

If the resulting datetime object would be out of the [min_datetime, max_datetime] range.


PrevUpHomeNext