-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathvalue-ptr-main.t.hpp
57 lines (39 loc) · 1.47 KB
/
value-ptr-main.t.hpp
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
48
49
50
51
52
53
54
55
56
57
// Copyright 2017-2018 by Martin Moene
//
// https://github.com/martinmoene/value-ptr-lite
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#pragma once
#ifndef value_ptr_lite_T_INCLUDED
#define value_ptr_lite_T_INCLUDED
#include "nonstd/value_ptr.hpp"
// Compiler warning suppression for usage of lest:
#ifdef __clang__
# pragma clang diagnostic ignored "-Wstring-conversion"
# pragma clang diagnostic ignored "-Wunused-parameter"
# pragma clang diagnostic ignored "-Wunused-template"
# pragma clang diagnostic ignored "-Wunused-function"
# pragma clang diagnostic ignored "-Wunused-member-function"
#elif defined __GNUC__
# pragma GCC diagnostic ignored "-Wunused-parameter"
# pragma GCC diagnostic ignored "-Wunused-function"
#endif
#include <iostream>
namespace nonstd { namespace vptr {
// use oparator<< instead of to_string() overload;
// see http://stackoverflow.com/a/10651752/437272
template< typename T, class Cloner, class Deleter>
inline std::ostream & operator<<( std::ostream & os, ::nonstd::value_ptr<T, Cloner, Deleter> const & vp )
{
os << "[value_ptr: "; if (vp) os << *vp; else os << "[empty]"; return os << "]";
}
}}
namespace lest {
using ::nonstd::vptr::operator<<;
} // namespace lest
#include "lest_cpp03.hpp"
extern lest::tests & specification();
#define CASE( name ) lest_CASE( specification(), name )
#endif // value_ptr_lite_T_INCLUDED
// end of file