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

Fix build with clang on OS X#169

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
deanberris merged 1 commit intocpp-netlib:masterfromimaginaryboy:master
Nov 19, 2012
Merged
Changes fromall commits
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
Move streaming to a log_record method because to remove use of non-st…
…andard rvalue binding to a non-const lvalue reference.
  • Loading branch information
@imaginaryboy
imaginaryboy committedNov 19, 2012
commit11f3c52503e2f54263ebcd22d18dadd2a52e3015
13 changes: 7 additions & 6 deletionsinclude/network/logging/logging.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,12 +63,19 @@ class log_record
m_text_stream << something;
return *this;
}

template< typename TypeOfSomething >
inline log_record& operator<<( TypeOfSomething&& something )
{
return write( std::forward<TypeOfSomething>(something) );
}

std::string message() const { return m_text_stream.str(); }
const std::string& filename() const { return m_filename; }
unsigned long line() const { return m_line; }

private:

// disable copy
log_record( const log_record& ); // = delete;
log_record& operator=( const log_record& ); // = delete;
Expand All@@ -77,12 +84,6 @@ class log_record
std::string m_filename; // = UNKNOWN_FILE_NAME;
unsigned long m_line; // = 0;
};

template< typename TypeOfSomething >
inline log_record& operator<<( log_record& log, TypeOfSomething&& something )
{
return log.write( std::forward<TypeOfSomething>(something) );
}

}}

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp