Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/cpplint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/cpplint/GitHub-Action-for-cpplint

name: cpplint
on: [push, pull_request, pull_request_target, fork]
on: [push, pull_request]
jobs:
cpplint:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cpplint_modified_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# From: https://github.com/cpplint/GitHub-Action-for-cpplint

name: cpplint
on: [push, pull_request, pull_request_target, fork]
on: [push, pull_request]
jobs:
cpplint:
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion lib_example/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include "../lib_example/example.h"

float division(int a, int b) {
if (b == 0) throw std::invalid_argument("Input Error: can't divide by zero!");
if (b == 0) {
throw std::invalid_argument("Input Error: can't divide by zero!");
}
return static_cast<float>(a) / b;
}
7 changes: 4 additions & 3 deletions lib_example/example.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
#include <string>
#include <stdexcept>

/********************************* ������ ������� ****************************/
/********************************* ÏÐÈÌÅÐ ÔÓÍÊÖÈÉ ****************************/
float division(int a, int b);
/*****************************************************************************/


/************************* ������ ��������� ������� **************************/
/************************* ÏÐÈÌÅÐ ØÀÁËÎÍÍÛÕ ÊËÀÑÑÎÂ **************************/
template <typename T> class ExampleClass;
template <typename T>
std::ostream& operator<<(std::ostream& out, const ExampleClass<T>& obj) noexcept;
std::ostream& operator<<(std::ostream& out,
const ExampleClass<T>& obj) noexcept;

template <typename T>
class ExampleClass {
Expand Down