os/ossrv/ossrv_pub/boost_apis/boost/archive/wcslen.hpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
#ifndef BOOST_ARCHIVE_WCSLEN_HPP
sl@0
     2
#define BOOST_ARCHIVE_WCSLEN_HPP
sl@0
     3
sl@0
     4
// MS compatible compilers support #pragma once
sl@0
     5
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
sl@0
     6
# pragma once
sl@0
     7
#endif
sl@0
     8
sl@0
     9
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
sl@0
    10
// wcslen.hpp:
sl@0
    11
sl@0
    12
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . 
sl@0
    13
// Use, modification and distribution is subject to the Boost Software
sl@0
    14
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
sl@0
    15
// http://www.boost.org/LICENSE_1_0.txt)
sl@0
    16
sl@0
    17
//  See http://www.boost.org for updates, documentation, and revision history.
sl@0
    18
sl@0
    19
#include <cstddef> // size_t
sl@0
    20
#include <boost/config.hpp>
sl@0
    21
#if defined(BOOST_NO_STDC_NAMESPACE)
sl@0
    22
namespace std{ 
sl@0
    23
    using ::size_t; 
sl@0
    24
} // namespace std
sl@0
    25
#endif
sl@0
    26
sl@0
    27
#ifndef BOOST_NO_CWCHAR
sl@0
    28
sl@0
    29
// a couple of libraries which include wchar_t don't include
sl@0
    30
// wcslen
sl@0
    31
sl@0
    32
#if defined(BOOST_DINKUMWARE_STDLIB) && BOOST_DINKUMWARE_STDLIB < 306 \
sl@0
    33
|| defined(__LIBCOMO__) 
sl@0
    34
sl@0
    35
namespace std {
sl@0
    36
inline std::size_t wcslen(const wchar_t * ws)
sl@0
    37
{
sl@0
    38
    const wchar_t * eows = ws;
sl@0
    39
    while(* eows != 0)
sl@0
    40
        ++eows;
sl@0
    41
    return eows - ws;
sl@0
    42
}
sl@0
    43
} // namespace std
sl@0
    44
sl@0
    45
#else
sl@0
    46
sl@0
    47
#include <cwchar>
sl@0
    48
#ifdef BOOST_NO_STDC_NAMESPACE
sl@0
    49
namespace std{ using ::wcslen; }
sl@0
    50
#endif
sl@0
    51
sl@0
    52
#endif // wcslen
sl@0
    53
sl@0
    54
#endif //BOOST_NO_CWCHAR
sl@0
    55
sl@0
    56
#endif //BOOST_ARCHIVE_WCSLEN_HPP