Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

clang-format 0.11-devel#438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
clang-format -ifind . -name "*.*pp"
  • Loading branch information
@deanberris
deanberris committedSep 6, 2014
commite5ea5b5aa9972724f3d8ac8ff2dc2e833973b44c
1,557 changes: 817 additions & 740 deletionsboost/mime.hpp
View file
Open in desktop

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletionsboost/network.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,8 +11,7 @@
// Author: Dean Michael Berris
// Date: May 20, 2007

#include <boost/network/message.hpp> // message type implementation
#include <boost/network/protocol.hpp> // protocols implementation

#endif // __NETWORK_HPP__
#include <boost/network/message.hpp> // message type implementation
#include <boost/network/protocol.hpp> // protocols implementation

#endif // __NETWORK_HPP__
264 changes: 122 additions & 142 deletionsboost/network/constants.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,150 +10,130 @@
#include <boost/network/support/is_default_wstring.hpp>
#include <boost/mpl/if.hpp>

namespace boost { namespace network {
namespace boost {
namespace network {

namespace impl {
template <class Tag>
struct constants_narrow {

static char const * crlf() {
static char crlf_[] = { '\r', '\n', 0 };
return crlf_;
}

static char const * dot() {
static char dot_[] = { '.', 0 };
return dot_;
}

static char dot_char() { return '.'; }

static char const * http_slash() {
static char http_slash_[] = { 'H', 'T', 'T', 'P', '/', 0 };
return http_slash_;
}

static char const * space() {
static char space_[] = {' ', 0};
return space_;
}

static char space_char() { return ' '; }

static char const * slash() {
static char slash_[] = {'/', 0};
return slash_;
}

static char slash_char() { return '/'; }

static char const * host() {
static char host_[] = {'H', 'o', 's', 't', 0};
return host_;
}

static char const * colon() {
static char colon_[] = {':', 0};
return colon_;
}

static char colon_char() { return ':'; }

static char const * accept() {
static char accept_[] = {'A', 'c', 'c', 'e', 'p', 't', 0};
return accept_;
}

static char const * default_accept_mime() {
static char mime_[] = {
'*', '/', '*', 0
};
return mime_;
}

static char const * accept_encoding() {
static char accept_encoding_[] = {
'A','c','c','e','p','t','-','E','n','c','o','d','i','n','g',0
};
return accept_encoding_;
}

static char const * default_accept_encoding() {
static char default_accept_encoding_[] = {
'i','d','e','n','t','i','t','y',';','q','=','1','.','0',',',' ','*',';','q','=','0',0
};
return default_accept_encoding_;
}

static char const * user_agent() {
static char user_agent_[] = {
'U','s','e','r','-','A','g','e','n','t',0
};
return user_agent_;
}

static char const * cpp_netlib_slash() {
static char cpp_netlib_slash_[] = {
'c','p','p','-','n','e','t','l','i','b','/',0
};
return cpp_netlib_slash_;
}

static char question_mark_char() {
return '?';
}

static char hash_char() {
return '#';
}

static char const * connection() {
static char connection_[] = {
'C','o','n','n','e','c','t','i','o','n',0
};
return connection_;
}

static char const * close() {
static char close_[] = {
'C','l','o','s','e', 0
};
return close_;
}

static char const * https() {
static char https_[] = "https";
return https_;
}

};

template <class Tag>
struct constants_wide {

static wchar_t const * https() {
static wchar_t https_[] = L"https";
return https_;
}

};
template <class Tag> struct constants_narrow {

static char const* crlf() {
static char crlf_[] = {'\r', '\n', 0};
return crlf_;
}

static char const* dot() {
static char dot_[] = {'.', 0};
return dot_;
}

static char dot_char() { return '.'; }

static char const* http_slash() {
static char http_slash_[] = {'H', 'T', 'T', 'P', '/', 0};
return http_slash_;
}

static char const* space() {
static char space_[] = {' ', 0};
return space_;
}

static char space_char() { return ' '; }

static char const* slash() {
static char slash_[] = {'/', 0};
return slash_;
}

static char slash_char() { return '/'; }

static char const* host() {
static char host_[] = {'H', 'o', 's', 't', 0};
return host_;
}

static char const* colon() {
static char colon_[] = {':', 0};
return colon_;
}

static char colon_char() { return ':'; }

static char const* accept() {
static char accept_[] = {'A', 'c', 'c', 'e', 'p', 't', 0};
return accept_;
}

static char const* default_accept_mime() {
static char mime_[] = {'*', '/', '*', 0};
return mime_;
}

static char const* accept_encoding() {
static char accept_encoding_[] = {'A', 'c', 'c', 'e', 'p', 't',
'-', 'E', 'n', 'c', 'o', 'd',
'i', 'n', 'g', 0};
return accept_encoding_;
}

static char const* default_accept_encoding() {
static char default_accept_encoding_[] = {
'i', 'd', 'e', 'n', 't', 'i', 't', 'y', ';', 'q', '=',
'1', '.', '0', ',', ' ', '*', ';', 'q', '=', '0', 0};
return default_accept_encoding_;
}

static char const* user_agent() {
static char user_agent_[] = {'U', 's', 'e', 'r', '-', 'A',
'g', 'e', 'n', 't', 0};
return user_agent_;
}

static char const* cpp_netlib_slash() {
static char cpp_netlib_slash_[] = {'c', 'p', 'p', '-', 'n', 'e',
't', 'l', 'i', 'b', '/', 0};
return cpp_netlib_slash_;
}

static char question_mark_char() { return '?'; }

static char hash_char() { return '#'; }

static char const* connection() {
static char connection_[] = {'C', 'o', 'n', 'n', 'e', 'c',
't', 'i', 'o', 'n', 0};
return connection_;
}

static char const* close() {
static char close_[] = {'C', 'l', 'o', 's', 'e', 0};
return close_;
}

static char const* https() {
static char https_[] = "https";
return https_;
}
};

template <class Tag> struct constants_wide {

static wchar_t const* https() {
static wchar_t https_[] = L"https";
return https_;
}
};
}

template <class Tag>
struct constants :
mpl::if_<
is_default_string<Tag>,
impl::constants_narrow<Tag>,
typename mpl::if_<
is_default_wstring<Tag>,
impl::constants_wide<Tag>,
unsupported_tag<Tag>
>::type
>::type
{};

} // namespace network

} // namespace boost

#endif // BOOST_NETWORK_CONSTANTS_HPP_20100808
struct constants
: mpl::if_<is_default_string<Tag>, impl::constants_narrow<Tag>,
typename mpl::if_<is_default_wstring<Tag>,
impl::constants_wide<Tag>,
unsupported_tag<Tag> >::type>::type {};

} // namespace network

} // namespace boost

#endif // BOOST_NETWORK_CONSTANTS_HPP_20100808
16 changes: 9 additions & 7 deletionsboost/network/detail/debug.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,14 +12,16 @@
the macro amounts to a no-op.
*/
#ifdef BOOST_NETWORK_DEBUG
# include <iostream>
# ifndef BOOST_NETWORK_MESSAGE
# define BOOST_NETWORK_MESSAGE(msg) std::cerr << "[DEBUG " << __FILE__ << ':' << __LINE__ << "]: " << msg << std::endl;
# endif
#include <iostream>
#ifndef BOOST_NETWORK_MESSAGE
#define BOOST_NETWORK_MESSAGE(msg) \
std::cerr << "[DEBUG " << __FILE__ << ':' << __LINE__ << "]: " << msg \
<< std::endl;
#endif
#else
#ifndef BOOST_NETWORK_MESSAGE
#define BOOST_NETWORK_MESSAGE(msg)
#endif
#ifndef BOOST_NETWORK_MESSAGE
#define BOOST_NETWORK_MESSAGE(msg)
#endif
#endif

#endif /* end of include guard: BOOST_NETWORK_DEBUG_HPP_20110410 */
31 changes: 15 additions & 16 deletionsboost/network/detail/directive_base.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,25 +10,24 @@
/** Defines the base type from which all directives inherit
* to allow friend access to message and other types' internals.
*/
namespace boost { namespace network { namespace detail {
namespace boost {
namespace network {
namespace detail {

template <class Tag>
struct directive_base {
typedef Tag tag ;
//explicit directive_base(basic_message<tag> & message_)
// : _message(message_)
protected:
~directive_base()
{ }; // can only be extended
template <class Tag> struct directive_base {
typedef Tag tag;
// explicit directive_base(basic_message<tag> & message_)
// : _message(message_)
protected:
~directive_base() {}; // can only be extended

// mutable basic_message<tag> & _message;
};
// mutable basic_message<tag> & _message;
};

} // namespace detail
} // namespace detail

} // namespace network
} // namespace network

} // namespace boost

#endif // __NETWORK_DETAIL_DIRECTIVE_BASE_HPP__
} // namespace boost

#endif // __NETWORK_DETAIL_DIRECTIVE_BASE_HPP__
Loading

[8]ページ先頭

©2009-2025 Movatter.jp