Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:36:46

0001 
0002 // Copyright 2021, Jefferson Science Associates, LLC.
0003 // Subject to the terms in the LICENSE file found in the top-level directory.
0004 
0005 #pragma once
0006 #include <utility>
0007 
0008 /// Ideally we'd just use std::any, but we are restricted to C++14 for the time being
0009 struct JAny {
0010     virtual ~JAny() = default;
0011 };
0012 
0013 /// Ideally we'd just use std::any, but we are restricted to C++14 for the time being
0014 template <typename T>
0015 struct JAnyT : JAny {
0016     T t;
0017     JAnyT(T&& tt) : t(std::move(tt)) {}
0018     ~JAnyT() override = default; // deletes the t
0019 };
0020