/usr/include/soci/boost-gregorian-date.h is in libsoci-dev 3.2.3-2ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | //
// Copyright (C) 2008 Maciej Sobczak
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef SOCI_BOOST_GREGORIAN_DATE_H_INCLUDED
#define SOCI_BOOST_GREGORIAN_DATE_H_INCLUDED
#include "type-conversion-traits.h"
// boost
#include <boost/date_time/gregorian/gregorian_types.hpp>
#include <boost/date_time/gregorian/conversion.hpp>
// std
#include <ctime>
namespace soci
{
template<>
struct type_conversion<boost::gregorian::date>
{
typedef std::tm base_type;
static void from_base(
base_type const & in, indicator ind, boost::gregorian::date & out)
{
if (ind == i_null)
{
throw soci_error("Null value not allowed for this type");
}
out = boost::gregorian::date_from_tm(in);
}
static void to_base(
boost::gregorian::date const & in, base_type & out, indicator & ind)
{
out = boost::gregorian::to_tm(in);
ind = i_ok;
}
};
} // namespace soci
#endif // SOCI_BOOST_GREGORIAN_DATE_H_INCLUDED
|