Compare commits
1 Commits
ea6777f7ea
...
30bd3d0526
Author | SHA1 | Date |
---|---|---|
mandlm | 30bd3d0526 |
|
@ -21,7 +21,7 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: clang-format
|
- id: clang-format
|
||||||
- id: clang-tidy
|
- id: clang-tidy
|
||||||
args: [-p=.build]
|
args: [-p=build]
|
||||||
|
|
||||||
- repo: https://github.com/cheshirekow/cmake-format-precommit
|
- repo: https://github.com/cheshirekow/cmake-format-precommit
|
||||||
rev: v0.6.13
|
rev: v0.6.13
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
add_library(
|
add_library(
|
||||||
chapter_02
|
chapter_02 src/initlist.cpp src/null.cpp src/constexp.cpp src/ifswitch.cpp
|
||||||
src/initlist.cpp
|
src/structured_binding.cpp src/type_inference.cpp)
|
||||||
src/null.cpp
|
|
||||||
src/constexp.cpp
|
|
||||||
src/ifswitch.cpp
|
|
||||||
src/structured_binding.cpp
|
|
||||||
src/type_inference.cpp
|
|
||||||
src/if_constexpr.cpp)
|
|
||||||
|
|
||||||
target_compile_features(chapter_02 PUBLIC cxx_std_20)
|
target_compile_features(chapter_02 PUBLIC cxx_std_20)
|
||||||
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "chapter_interface.h"
|
|
||||||
|
|
||||||
class IfConstexprTest : public ChapterTest {
|
|
||||||
public:
|
|
||||||
virtual void run() override;
|
|
||||||
virtual const char *name() const override { return "If constexpr test"; }
|
|
||||||
};
|
|
|
@ -1,6 +0,0 @@
|
||||||
#include <iostream>
|
|
||||||
#include <type_traits>
|
|
||||||
|
|
||||||
#include "if_constexpr.h"
|
|
||||||
|
|
||||||
void IfConstexprTest::run() {}
|
|
|
@ -4,7 +4,6 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "constexp.h"
|
#include "constexp.h"
|
||||||
#include "if_constexpr.h"
|
|
||||||
#include "ifswitch.h"
|
#include "ifswitch.h"
|
||||||
#include "initlist.h"
|
#include "initlist.h"
|
||||||
#include "null.h"
|
#include "null.h"
|
||||||
|
@ -25,7 +24,6 @@ int main(int argc, char **argv) {
|
||||||
chapter_2_tests.emplace_back(std::make_unique<InitListTest>());
|
chapter_2_tests.emplace_back(std::make_unique<InitListTest>());
|
||||||
chapter_2_tests.emplace_back(std::make_unique<StructuredBindingTest>());
|
chapter_2_tests.emplace_back(std::make_unique<StructuredBindingTest>());
|
||||||
chapter_2_tests.emplace_back(std::make_unique<TypeInferenceTest>());
|
chapter_2_tests.emplace_back(std::make_unique<TypeInferenceTest>());
|
||||||
chapter_2_tests.emplace_back(std::make_unique<IfConstexprTest>());
|
|
||||||
|
|
||||||
for (auto &test : chapter_2_tests) {
|
for (auto &test : chapter_2_tests) {
|
||||||
std::cout << "\n" << test->name() << ":" << std::endl;
|
std::cout << "\n" << test->name() << ":" << std::endl;
|
||||||
|
|
Loading…
Reference in New Issue