Move castable into utils.
The Castable class is used by utils/. This Cl moves the implementation
into the utils/ folder. The `Is` and `As` methods are added into the
`tint` namespace to make usage shorter.
Change-Id: I0decedb92ebed01b6aa12d2e3efa7190742e9a33
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/127402
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/src/tint/constant/composite.h b/src/tint/constant/composite.h
index ef7233c..7a50640 100644
--- a/src/tint/constant/composite.h
+++ b/src/tint/constant/composite.h
@@ -15,10 +15,10 @@
#ifndef SRC_TINT_CONSTANT_COMPOSITE_H_
#define SRC_TINT_CONSTANT_COMPOSITE_H_
-#include "src/tint/castable.h"
#include "src/tint/constant/value.h"
#include "src/tint/number.h"
#include "src/tint/type/type.h"
+#include "src/tint/utils/castable.h"
#include "src/tint/utils/hash.h"
#include "src/tint/utils/vector.h"
@@ -28,7 +28,7 @@
/// Composite may be of a vector, matrix, array or structure type.
/// If each element is the same type and value, then a Splat would be a more efficient constant
/// implementation. Use CreateComposite() to create the appropriate type.
-class Composite : public Castable<Composite, Value> {
+class Composite : public utils::Castable<Composite, Value> {
public:
/// Constructor
/// @param t the compsite type