The following code example is taken from the book
C++ Move Semantics - The Complete Guide
by Nicolai M. Josuttis,
Leanpub, 2020
The code is licensed under a
Creative Commons Attribution 4.0 International License.
// raw code // type trait to check whether a base class guarantees not to throw // in the move constructor (even if the constructor is not callable)
#ifndef IS_NOTHROW_MOVABLE_HPP
#define IS_NOTHROW_MOVABLE_HPP
#include <type_traits>
template<typename Base>
struct Wrapper : Base {
using Base::Base; // implement all possibly wrapped pure virtual functions:
void print() const {} //...
};